Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better use of context in the tests/watcher pkg #11865

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nunnatsa
Copy link
Contributor

@nunnatsa nunnatsa commented May 8, 2024

What this PR does

Before this PR:

  • timeout was manually handled
  • client call was done with a new context, instead of the context parameter
  • confusing lambdas

After this PR:

  • use the existing ability of the standard library context timeout handling
  • use the context when using the client, to respect the context timeout and canceling, in the client.
  • make lambdas a regular function to improve readability.

Release note

None

/sig code-quality

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
use context instead of manually handle timeouts.

use the context parameter to make a client call.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. sig/code-quality dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/L labels May 8, 2024
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign alonakaplan for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@nunnatsa nunnatsa changed the title Better use of context in the tests/watch pck Better use of context in the tests/watcher pck May 8, 2024
@nunnatsa nunnatsa changed the title Better use of context in the tests/watcher pck Better use of context in the tests/watcher pkg May 8, 2024
@kubevirt-bot
Copy link
Contributor

@nunnatsa: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubevirt-e2e-kind-1.27-vgpu 70ccba7 link false /test pull-kubevirt-e2e-kind-1.27-vgpu
pull-kubevirt-e2e-k8s-1.30-sig-network 70ccba7 link true /test pull-kubevirt-e2e-k8s-1.30-sig-network

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@nunnatsa nunnatsa marked this pull request as draft May 8, 2024 11:22
@kubevirt-bot kubevirt-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. sig/code-quality size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants