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

Bump dependencies #267

Merged
merged 3 commits into from
Oct 20, 2023
Merged

Bump dependencies #267

merged 3 commits into from
Oct 20, 2023

Conversation

nunnatsa
Copy link
Contributor

@nunnatsa nunnatsa commented Oct 16, 2023

The primary goal of this PR is to bump the dependencies. In attempting to bump the dependences @nunnatsa discovered a conflict between kubevirt/client-go and updating the core k8s depenedences. Upon further inspection, it was determined that we only needed the kubevirt/client-go package for our e2e tests, and not the capk controllers themselfs.

So, in order to update the core k8s dependences for the capk controllers without entering into dependency hell, Nahshon separated the dependences for the e2e tests and capk controllers. This removed us from having to have kubevirt/client-go in our primary go.mod file.

In all, his changes are...

  • Separate dependencies for the controllers and e2e into separate go.mod files
  • Update the code to work with the new dependencies. (that meant moving the validation webhook logic and passing around the context object)
  • Removing Passt support (the e2e test is failing and we don't intend to support passt binding anymore)
Bump dependencies and separate e2e test and controller dependencies

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 16, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nunnatsa

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 16, 2023
@nunnatsa
Copy link
Contributor Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 16, 2023
@nunnatsa nunnatsa force-pushed the bump-all branch 5 times, most recently from 6251d7e to a78aab0 Compare October 17, 2023 11:42
@coveralls
Copy link

coveralls commented Oct 17, 2023

Pull Request Test Coverage Report for Build 6584385022

  • 35 of 83 (42.17%) changed or added relevant lines in 6 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+12.3%) to 61.992%

Changes Missing Coverage Covered Lines Changed/Added Lines %
controllers/kubevirtmachine_controller.go 5 16 31.25%
controllers/kubevirtcluster_controller.go 1 15 6.67%
pkg/webhookhandler/validator.go 26 49 53.06%
Files with Coverage Reduction New Missed Lines %
controllers/kubevirtcluster_controller.go 1 45.7%
Totals Coverage Status
Change from base Build 6232901575: 12.3%
Covered Lines: 946
Relevant Lines: 1526

💛 - Coveralls

@nunnatsa nunnatsa force-pushed the bump-all branch 2 times, most recently from 33532bf to 53601a7 Compare October 17, 2023 14:50
@agradouski
Copy link
Contributor

this PR does a bit more than just bumping dependencies.
perhaps it's worth splitting it to several focused PRs @nunnatsa, to simplify the review?
or, please add more comments about various updates you're making to the logic.
thanks

@nunnatsa
Copy link
Contributor Author

this PR does a bit more than just bumping dependencies. perhaps it's worth splitting it to several focused PRs @nunnatsa, to simplify the review? or, please add more comments about various updates you're making to the logic. thanks

@agradouski - there is no logic change. All the code changes are required by API changes in the bumped modules. I don't know how to split it to smaller commits, if I want any commit to be compile-able.

controllers/kubevirtmachine_controller.go Outdated Show resolved Hide resolved
kubevirtci Outdated
Comment on lines 5 to 6
export KUBEVIRT_PROVIDER=${KUBEVIRT_PROVIDER:-k8s-1.27}
export TENANT_CLUSTER_KUBERNETES_VERSION=${TENANT_CLUSTER_KUBERNETES_VERSION:-v1.27.6}
Copy link
Contributor

Choose a reason for hiding this comment

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

i don't think we have a ubuntu image for v1.27 yet. The highest image i see is quay.io/capk/ubuntu-2004-container-disk:v1.26.0

Comment on lines +98 to +100
if !reflect.DeepEqual(old.Spec, requested.Spec) {
return errors.New(immutableWarning)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need to do this for this PR. But if all we care about is immutability (which appears to be the case) we can enforce this on the CRD now with CEL, and avoid a webhook entirely.

@davidvossel
Copy link
Contributor

davidvossel commented Oct 18, 2023

this PR does a bit more than just bumping dependencies. perhaps it's worth splitting it to several focused PRs @nunnatsa, to simplify the review? or, please add more comments about various updates you're making to the logic. thanks
@agradouski - there is no logic change. All the code changes are required by API changes in the bumped modules. I don't know how to split it to smaller commits, if I want any commit to be compile-able.

Yeah, there are a few things going on here. Here's some further context.

The primary goal of this PR is to bump the dependencies. In attempting to bump the dependences @nunnatsa discovered a conflict between kubevirt/client-go and updating the core k8s depenedences. Upon further inspection, it was determined that we only needed the kubevirt/client-go package for our e2e tests, and not the capk controllers themselfs.

So, in order to update the core k8s dependences for the capk controllers without entering into dependency hell, Nahshon separated the dependences for the e2e tests and capk controllers. This removed us from having to have kubevirt/client-go in our primary go.mod file.

In all, his changes are...

  1. Separate dependencies for the controllers and e2e into separate go.mod files
  2. Update the code to work with the new dependencies. (that meant moving the validation webhook logic and passing around the context object)
  3. Removing Passt support (the e2e test is failing and we don't intend to support passt binding anymore)

Fix the code to use new APIs in the updated dependencies.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
@nunnatsa nunnatsa force-pushed the bump-all branch 6 times, most recently from cf68dfc to 5538aed Compare October 20, 2023 05:18
@nunnatsa nunnatsa force-pushed the bump-all branch 5 times, most recently from d063fbf to 6bec738 Compare October 20, 2023 11:52
Remove the "creates a simple cluster with ephemeral VMs with Passt" e2e
test, as it's not needed anymore.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
Copy link
Contributor

@davidvossel davidvossel left a comment

Choose a reason for hiding this comment

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

/lgtm

I updated the description of the PR to better reflect the work that is being done here. This PR is important because it gives us the ability more easily bump dependencies in the future for the controllers while not conflicting with some of the dependencies required for our e2e tests.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 20, 2023
@k8s-ci-robot k8s-ci-robot merged commit 238e1c9 into kubernetes-sigs:main Oct 20, 2023
13 checks passed
@nunnatsa nunnatsa deleted the bump-all branch October 22, 2023 06:27
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants