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

[virt-operator]: fix kubevirt version parsing #9564

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

enp0s3
Copy link
Contributor

@enp0s3 enp0s3 commented Apr 3, 2023

Signed-off-by: enp0s3 ibezukh@redhat.com

When the virt-operator image has digest instead of a tag, parse kubevirt version from KUBEVIRT_VERSION environment variable.

What this PR does / why we need it:
there was an issue when virt-operator image had digest instead of a tag, the hardcoded "latest" tag was used and KUBEVIRT_VERSION was ignored.

This led to an issue with tracking the kubevirt upgrade process. Periodic comparison of the KUBEVIRT_VERSION with the status.observedKubevirtVersion failed because the latter field got the latest string, instead of having the version as defined in KUBEVIRT_VERSION.

Fixes #
https://bugzilla.redhat.com/show_bug.cgi?id=2180146

Release note:

NONE

@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/M labels Apr 3, 2023
@enp0s3
Copy link
Contributor Author

enp0s3 commented Apr 3, 2023

/cc @acardace
/cc @fossedihelm
/cc @tiraboschi

@kubevirt-bot kubevirt-bot added lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Apr 3, 2023
there was an issue when virt-operator image had digest
instead of a tag, the hardcoded "latest" tag was used and
KUBEVIRT_VERSION was ignored.

this commit fixes this issue by taking the Kubevirt version from
the KUBEVIRT_VERSION env var in case digest is used instead of tag.

Signed-off-by: enp0s3 <ibezukh@redhat.com>
@stu-gott stu-gott force-pushed the virt-operator-kubevirt-version branch from 0190fd7 to f4a4fa3 Compare April 5, 2023 17:09
@kubevirt-bot kubevirt-bot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Apr 5, 2023
Copy link
Contributor

@jean-edouard jean-edouard left a comment

Choose a reason for hiding this comment

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

/approve
@dhiller the PR was rebased to resolve a merge conflict, PTAL!

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jean-edouard

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 5, 2023
@jean-edouard
Copy link
Contributor

/cherry-pick release-0.59

@kubevirt-bot
Copy link
Contributor

@jean-edouard: once the present PR merges, I will cherry-pick it on top of release-0.59 in a new PR and assign it to you.

In response to this:

/cherry-pick release-0.59

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.

@fossedihelm
Copy link
Contributor

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 6, 2023
@kbidarkar
Copy link
Contributor

/retest-required

@kubevirt-commenter-bot
Copy link

/retest-required
This bot automatically retries required jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@kubevirt-bot
Copy link
Contributor

kubevirt-bot commented Apr 6, 2023

@enp0s3: The following test 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-fossa f4a4fa3 link false /test pull-kubevirt-fossa

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.

@kubevirt-bot kubevirt-bot merged commit 31a9bc4 into kubevirt:main Apr 6, 2023
@kubevirt-bot
Copy link
Contributor

@jean-edouard: #9564 failed to apply on top of branch "release-0.59":

Applying: virt-operator: fix kubevirt version parsing
Using index info to reconstruct a base tree...
M	pkg/virt-operator/util/config.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/virt-operator/util/config.go
CONFLICT (content): Merge conflict in pkg/virt-operator/util/config.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 virt-operator: fix kubevirt version parsing
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-0.59

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.

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. release-note-none Denotes a PR that doesn't merit a release note. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants