[go: nahoru, domu]

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

Integrate sidecar shim image #11272

Merged
merged 4 commits into from
Mar 16, 2024
Merged

Conversation

dharmit
Copy link
Contributor
@dharmit dharmit commented Feb 16, 2024

What this PR does

Before this PR: image field in the hooks.kubevirt.io/hookSidecars annotation in this example was mandatory.

After this PR: aforementioned field will be optional.

Fixes #11161

Why we need it and why it was done in this way

The following tradeoffs were made: N/A

The following alternatives were considered: N/A

Links to places where the discussion took place:

Special notes for your reviewer

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

Release note

Make 'image' field in hook sidecar annotation optional.

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Feb 16, 2024
@kubevirt-bot
Copy link
Contributor

Hi @dharmit. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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.

tiraboschi added a commit to tiraboschi/hyperconverged-cluster-operator that referenced this pull request Feb 28, 2024
Wait for:
kubevirt/kubevirt#11272

to get the --sidecar-shim-image parameter
on the CSV generator on kubevirt oeprator

Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
@dharmit dharmit marked this pull request as ready for review March 4, 2024 14:25
@kubevirt-bot kubevirt-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 4, 2024
@dharmit
Copy link
Contributor Author
dharmit commented Mar 4, 2024

@alicefr @victortoso @vasiliy-ul can you folks help with review? Pinging you folks since I have noticed you being active on sidecar hook side of the things. :)

Copy link
Contributor
@vasiliy-ul vasiliy-ul left a comment

Choose a reason for hiding this comment

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

Overall, this looks okay. One thing to consider: we already have some tests for sidecars in tests/vmi_hook_sidecar_test.go. But they all explicitly set the image. Perhaps we shall consider changing that, so at least a couple of tests run with an empty image. WDYT?

@@ -22,7 +22,9 @@ package services
import (
"context"
"fmt"
operatorutil "kubevirt.io/kubevirt/pkg/virt-operator/util"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can we move this to the group with local imports?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ack. Done.

@vasiliy-ul
Copy link
Contributor

/test pull-kubevirt-build

@vasiliy-ul
Copy link
Contributor

/test pull-kubevirt-unit-test

@vasiliy-ul
Copy link
Contributor

There are some formatting issues.

@vasiliy-ul
Copy link
Contributor

Also, unit-test failure seems caused by this change.

@dharmit
Copy link
Contributor Author
dharmit commented Mar 6, 2024

Perhaps we shall consider changing that, so at least a couple of tests run with an empty image. WDYT?

I agree. I have added one test. If you have a suggestion for more tests in the same file, let me know. I'm open to add more.

@dharmit
Copy link
Contributor Author
dharmit commented Mar 6, 2024

There are some formatting issues.

Can you point? I found that running make test modified the bazel file. Is that the one you're talking about?

Also, unit-test failure seems caused by this change.

Thanks. Fixed.

@dharmit
Copy link
Contributor Author
dharmit commented Mar 6, 2024

/test pull-kubevirt-unit-test

@kubevirt-bot
Copy link
Contributor

@dharmit: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test pull-kubevirt-unit-test

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.

@vasiliy-ul
Copy link
Contributor

Can you point? I found that running make test modified the bazel file. Is that the one you're talking about?

@dharmit, you can see the formatting issue in the details for the pull-kubevirt-build job: https://prow.ci.kubevirt.io/view/gs/kubevirt-prow/pr-logs/pull/kubevirt_kubevirt/11272/pull-kubevirt-build/1764935860379193344

diff -u ./pkg/hooks/hooks.go.orig ./pkg/hooks/hooks.go
--- ./pkg/hooks/hooks.go.orig	2024-03-05 08:50:01.812356865 +0000
+++ ./pkg/hooks/hooks.go	2024-03-05 08:50:01.812356865 +0000
@@ -21,6 +21,7 @@
 
 import (
 	"encoding/json"
+
 	k8sv1 "k8s.io/api/core/v1"
 
 	v1 "kubevirt.io/api/core/v1"
diff -u ./pkg/virt-controller/services/template.go.orig ./pkg/virt-controller/services/template.go
--- ./pkg/virt-controller/services/template.go.orig	2024-03-05 08:50:03.168358416 +0000
+++ ./pkg/virt-controller/services/template.go	2024-03-05 08:50:03.168358416 +0000
@@ -22,12 +22,13 @@
 import (
 	"context"
 	"fmt"
-	operatorutil "kubevirt.io/kubevirt/pkg/virt-operator/util"
 	"math/rand"
 	"os"
 	"strconv"
 	"strings"
 
+	operatorutil "kubevirt.io/kubevirt/pkg/virt-operator/util"
+
 	networkv1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1"
 	k8sv1 "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/api/resource"

Basically, you just need to build your changes locally and the autoformatter will adjust everything as needed. Then simply add and commit the changes.

One of the formatting issue is actually about #11272 (comment), which you probably fixed already.

tests/vmi_hook_sidecar_test.go Outdated Show resolved Hide resolved
hack/generate.sh Outdated Show resolved Hide resolved
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
@dharmit
Copy link
Contributor Author
dharmit commented Mar 14, 2024

@dharmit, there are compile failures.

/lgtm cancel

Oops. My apologies. I didn't run make test or make lint before pushing. I have done that this time.

Can you please help trigger a couple of selected tests to verify if we can move further with full tests?

@vasiliy-ul
Copy link
Contributor

/test pull-kubevirt-unit-test
/test pull-kubevirt-code-lint
/test pull-kubevirt-unit-test-arm64
/test pull-kubevirt-goveralls

@vasiliy-ul
Copy link
Contributor

/test pull-kubevirt-goveralls

@dharmit
Copy link
Contributor Author
dharmit commented Mar 14, 2024

/test pull-kubevirt-goveralls

I wonder if it's a real failure. Let's see. 😕

@vasiliy-ul
Copy link
Contributor

I think the failure is not related to this PR. Probably the job is not very stable. But lets just try one more time.

@brianmcarey
Copy link
Member

/test pull-kubevirt-goveralls

I wonder if it's a real failure. Let's see. 😕

Theres a known issue with the goveralls lane on main at the moment - @fossedihelm is working on a fix. The lane is not required at the moment so it should be ok.

@vasiliy-ul
Copy link
Contributor

Ok, then

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 14, 2024
@kubevirt-commenter-bot
Copy link

Required labels detected, running phase 2 presubmits:
/test pull-kubevirt-e2e-windows2016
/test pull-kubevirt-e2e-kind-1.27-vgpu
/test pull-kubevirt-e2e-kind-sriov
/test pull-kubevirt-e2e-k8s-1.29-ipv6-sig-network
/test pull-kubevirt-e2e-k8s-1.27-sig-network
/test pull-kubevirt-e2e-k8s-1.27-sig-storage
/test pull-kubevirt-e2e-k8s-1.27-sig-compute
/test pull-kubevirt-e2e-k8s-1.27-sig-operator
/test pull-kubevirt-e2e-k8s-1.28-sig-network
/test pull-kubevirt-e2e-k8s-1.28-sig-storage
/test pull-kubevirt-e2e-k8s-1.28-sig-compute
/test pull-kubevirt-e2e-k8s-1.28-sig-operator

@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.

@dharmit
Copy link
Contributor Author
dharmit commented Mar 15, 2024

@vasiliy-ul @brianmcarey should the 'goveralls' lane be manually overwritten? If yes, someone will have to do it on this PR.

@victortoso
Copy link
Member
victortoso commented Mar 15, 2024

should the 'goveralls' lane be manually overwritten

I think the job is not required so when tide finish the retesting, this should be merged, no?

@brianmcarey
Copy link
Member

should the 'goveralls' lane be manually overwritten

I think the job is not required so when tide finish the retesting, this should be merged, no?

Yes tide should handle it - its in a pool waiting for retest. https://prow.ci.kubevirt.io/tide

@kubevirt-bot
Copy link
Contributor
kubevirt-bot commented Mar 15, 2024

@dharmit: 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-goveralls 8600813 link false /test pull-kubevirt-goveralls

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 c8f756d into kubevirt:main Mar 16, 2024
35 of 37 checks passed
tiraboschi added a commit to tiraboschi/user-guide that referenced this pull request Apr 9, 2024
with kubevirt/kubevirt#11272
image field becomes optional in the hook sidecar annotation
since, if omitted, virt-controller will now use
a default sidecar-shim image built with other kubevirt
images.

Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
@tiraboschi
Copy link
Member

/cherry-pick release-1.2

@kubevirt-bot
Copy link
Contributor

@tiraboschi: #11272 failed to apply on top of branch "release-1.2":

Applying: Sort arguments for readability
Applying: Integrate sidecar shim image
Using index info to reconstruct a base tree...
M	hack/generate.sh
M	pkg/virt-operator/kubevirt_test.go
M	pkg/virt-operator/resource/apply/apps_test.go
M	pkg/virt-operator/resource/generate/components/daemonsets.go
M	pkg/virt-operator/resource/generate/install/strategy.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/virt-operator/resource/generate/install/strategy.go
Auto-merging pkg/virt-operator/resource/generate/components/daemonsets.go
Auto-merging pkg/virt-operator/resource/apply/apps_test.go
CONFLICT (content): Merge conflict in pkg/virt-operator/resource/apply/apps_test.go
Auto-merging pkg/virt-operator/kubevirt_test.go
CONFLICT (content): Merge conflict in pkg/virt-operator/kubevirt_test.go
Auto-merging hack/generate.sh
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 Integrate sidecar shim image
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-1.2

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.

@dharmit dharmit deleted the fix-cnv-36620 branch April 10, 2024 05:31
kubevirt-bot pushed a commit to kubevirt/user-guide that referenced this pull request Apr 26, 2024
with kubevirt/kubevirt#11272
image field becomes optional in the hook sidecar annotation
since, if omitted, virt-controller will now use
a default sidecar-shim image built with other kubevirt
images.

Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
@tiraboschi tiraboschi mentioned this pull request Jul 1, 2024
8 tasks
tiraboschi added a commit to kubevirt/hyperconverged-cluster-operator that referenced this pull request Aug 21, 2024
Wait for:
kubevirt/kubevirt#11272

to get the --sidecar-shim-image parameter
on the CSV generator on kubevirt oeprator

Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
tiraboschi added a commit to tiraboschi/hyperconverged-cluster-operator that referenced this pull request Aug 21, 2024
Wait for:
kubevirt/kubevirt#11272

to get the --sidecar-shim-image parameter
on the CSV generator on kubevirt oeprator

Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
tiraboschi added a commit to tiraboschi/hyperconverged-cluster-operator that referenced this pull request Aug 21, 2024
Wait for:
kubevirt/kubevirt#11272

to get the --sidecar-shim-image parameter
on the CSV generator on kubevirt oeprator

Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
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 Denotes a PR that will be considered when it comes time to generate release notes. sig/buildsystem Denotes an issue or PR that relates to changes in the build system. sig/scale size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make image field optional in the HookSidecar struct
8 participants