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

feat(kubevirt_vm_info): Set wait_condition based on running #91

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

0xFelix
Copy link
Member

@0xFelix 0xFelix commented Apr 24, 2024

What this PR does / why we need it:

Add the running parameter to kubevirt_vm_info from which the wait_condition is derived from when parameter wait is set to yes.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Release note:

Add the running parameter to kubevirt_vm_info that controls which ready condition to wait for.

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Apr 24, 2024
@0xFelix 0xFelix added minor_changes New parameters added to modules, or non-breaking behavior changes to existing parameters; no bugfix and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Apr 24, 2024
@0xFelix 0xFelix force-pushed the wait-condition-info branch from 8729f10 to d912631 Compare April 24, 2024 14:31
@kubevirt-bot kubevirt-bot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label Apr 24, 2024
@jcanocan
Copy link
Contributor

Nice improvement! Thanks!
/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 24, 2024
@@ -194,6 +212,7 @@ def arg_spec():
"namespace": {},
"label_selectors": {"type": "list", "elements": "str", "default": []},
"field_selectors": {"type": "list", "elements": "str", "default": []},
"running": {"type": "bool", "default": True},
"wait": {"type": "bool", "default": False},
"wait_sleep": {"type": "int", "default": 5},
"wait_timeout": {"type": "int", "default": 120},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add the following to arg spec definition to validate the param data passed to ensure the wait condition is provided when running is provided.

        required_by=dict(
            wait=('running', ),
        ),

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed!

@0xFelix 0xFelix force-pushed the wait-condition-info branch from d912631 to 74060f0 Compare April 24, 2024 16:39
@kubevirt-bot kubevirt-bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 24, 2024
Copy link

@maxamillion maxamillion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@kubevirt-bot
Copy link
Contributor

@maxamillion: changing LGTM is restricted to collaborators

In response to this:

LGTM 👍

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.

Add the running parameter to kubevirt_vm_info from which the
wait_condition is derived from when parameter wait is set to
yes.

Signed-off-by: Felix Matouschek <[email protected]>
@0xFelix 0xFelix force-pushed the wait-condition-info branch from 74060f0 to 71a8800 Compare April 24, 2024 16:48
@jcanocan
Copy link
Contributor

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 25, 2024
@0xFelix
Copy link
Member Author

0xFelix commented Apr 25, 2024

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 0xFelix

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

The pull request process is described 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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 25, 2024
@kubevirt-bot kubevirt-bot merged commit 13ceaf0 into kubevirt:main Apr 25, 2024
79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. minor_changes New parameters added to modules, or non-breaking behavior changes to existing parameters; no bugfix size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants