-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
k8s: Bump k8s libraries to v0.30.0 #11840
base: main
Are you sure you want to change the base?
Conversation
13af120
to
b4a4ae9
Compare
@@ -39,7 +39,7 @@ func DefaultLeaderElectionConfiguration() Configuration { | |||
LeaseDuration: metav1.Duration{Duration: DefaultLeaseDuration}, | |||
RenewDeadline: metav1.Duration{Duration: DefaultRenewDeadline}, | |||
RetryPeriod: metav1.Duration{Duration: DefaultRetryPeriod}, | |||
ResourceLock: resourcelock.EndpointsLeasesResourceLock, | |||
ResourceLock: resourcelock.LeasesResourceLock, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See here. Looks like that EndpointsLeasesResourceLock
is deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But for some reason the virt-controller
endpoint is gone... trying to figure out why
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well evidently this change made it so that the leader info is kept on the lease.
Fixed accordingly.
Added a comment on the commit desc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, makes sense.
@@ -1,6 +1,8 @@ | |||
module kubevirt.io/client-go | |||
|
|||
go 1.21 | |||
go 1.22.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I saw a runtime log saying that it needed it.. will try to remove it back and see if I get it again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go: module ./staging/src/kubevirt.io/client-go requires go >= 1.22.0; switching to go1.22.2
Added a comment on the commit desc.
api/openapi-spec/swagger.json
Outdated
"description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", | ||
"name": "fieldSelector", | ||
"in": "query" | ||
"$ref": "#/parameters/fieldSelector-xIcQKXFG" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swagger seems wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, sure looks odd. I counted about 19 of these. make apidoc
passes. still checking..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If IDE parse it then it sounds good
I am not familiar with it, better to ask someone who does
thanks
b4a4ae9
to
00b0bf3
Compare
8de6611
to
f97cee5
Compare
/retest-required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[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 |
732fe87
to
54d5151
Compare
we broke the streak! removing hold trying again |
pull-kubevirt-e2e-k8s-1.29-sig-monitoring failed, but on a different test. |
/test pull-kubevirt-e2e-k8s-1.29-sig-monitoring |
if !errors.IsAlreadyExists(err) { | ||
Expect(err).ToNot(HaveOccurred()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if !errors.IsAlreadyExists(err) { | |
Expect(err).ToNot(HaveOccurred()) | |
} | |
Expect(err).To(Or(MatchError(errors.IsAlreadyExists, "IsAlreadyExists"), Not(HaveOccurred()))) |
I would align the code also in lines 195-197
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad:
Expect(err).To(Or(Not(HaveOccurred(), MatchError(errors.IsAlreadyExists, "IsAlreadyExists"))))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RamLavi I think you have to change the Expect as I suggested before retest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I missed that. you're right. will change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to:
Expect(err).To(Or(Not(HaveOccurred()), MatchError(errors.IsAlreadyExists, "IsAlreadyExists")))
54d5151
to
d289469
Compare
/retest |
1 similar comment
/retest |
bumping of leader election added lease. Since the lease controlled by the role-binding on a namespave level, in order to recreate a VirtOperatorRESTErrorsBurst alert firing, both the role-binding and the cluster-role-binding need to be temporarily removed. Signed-off-by: Ram Lavi <ralavi@redhat.com>
d289469
to
b6da1a9
Compare
/test pull-kubevirt-unit-test-arm64 |
/lgtm |
Required labels detected, running phase 2 presubmits: |
Did you take a look on those #11840 (comment) ? |
Hey @oshoval , thanks for the heads up. I prefer not to hold the PR for this specific change at this point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is one more thing that I am not sure about. The first commit could be split but no requirement
pkg/virt-api/api.go
Outdated
@@ -786,7 +786,7 @@ func (app *virtAPIApp) Compose() { | |||
func (app *virtAPIApp) ConfigureOpenAPIService() { | |||
config := openapi.CreateConfig() | |||
config.GetDefinitions = v12.GetOpenAPIDefinitions | |||
spec, err := builderv3.BuildOpenAPISpecFromRoutes(restfuladapter.AdaptWebServices(restful.RegisteredWebServices()), config) | |||
spec, err := builder.BuildOpenAPISpecFromRoutes(restfuladapter.AdaptWebServices(restful.RegisteredWebServices()), config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we roll back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once I bumped the k8s version there was a version inconsistency, and config
(of type *common.Config
, created by openapi.CreateConfig()
) was no longer of the appropriate type (*common.OpenAPIV3Config
).
They moved the config to the v3 API.
Anyways per your question - the reason is I thought it would be the least change to move to the old function to keep consistency, as changing to builderv3 will result in other bigger changes.
But if you think that we should bump swagger to v3 as well then we can do that.
@@ -39,7 +39,7 @@ func DefaultLeaderElectionConfiguration() Configuration { | |||
LeaseDuration: metav1.Duration{Duration: DefaultLeaseDuration}, | |||
RenewDeadline: metav1.Duration{Duration: DefaultRenewDeadline}, | |||
RetryPeriod: metav1.Duration{Duration: DefaultRetryPeriod}, | |||
ResourceLock: resourcelock.EndpointsLeasesResourceLock, | |||
ResourceLock: resourcelock.LeasesResourceLock, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, makes sense.
I split it at the time to be more readable but eventually we must squash because the changes don't compile otherwise.. |
Signed-off-by: Ram Lavi <ralavi@redhat.com>
New changes are detected. LGTM label has been removed. |
Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits. 📝 Please follow instructions in the contributing guide to update your commits with the DCO Full details of the Developer Certificate of Origin can be found at developercertificate.org. The list of commits missing DCO signoff:
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-sigs/prow repository. I understand the commands that are listed here. |
PR needs rebase. 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-sigs/prow repository. |
@RamLavi: The following tests failed, say
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-sigs/prow repository. I understand the commands that are listed here. |
What this PR does
This PR bumps k8s vendor to v0.30.0 on go.mod files.
It also performs needed changes in order to comply with the new vendor libraries.
Note: This PR follows the update-k8s-dependencies. manual.
Fixes #
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
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