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 CAPI to v1.5.0, controller-runtime to v0.15.0 and controller-tools to v0.12.1 #280

Merged

Conversation

Sunnatillo
Copy link
Member

@Sunnatillo Sunnatillo commented Jul 13, 2023

This PR:

  1. Bumps CAPI to v1.5.0 and CR v0.15.0.
  2. Adds finalizers to objects with deletionTimeStamp due to changes in CR v0.15.0
  3. Removes deprecated linters(varcheck, structcheck, deadcode deprecated since golangci-lint v1.49.0)
  4. Adds WithStatusSubresource to fake client, due to status handling changes in CR v0.15.0.

@metal3-io-bot metal3-io-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 13, 2023
@Sunnatillo Sunnatillo force-pushed the bump-capi-v1.5.0-beta.1/sunnat branch 3 times, most recently from 7469130 to f1374fe Compare July 14, 2023 15:12
@Sunnatillo
Copy link
Member Author

/test gomod

@Sunnatillo
Copy link
Member Author

/retest

},
expectedAllocations: map[string]ipamv1.IPAddressStr{},
expectedNbAllocations: 0,
}),
Copy link
Member

Choose a reason for hiding this comment

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

what is this change related to?

Copy link
Member Author

@Sunnatillo Sunnatillo Jul 26, 2023

Choose a reason for hiding this comment

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

Name: "abcpref-192-168-1-11",
Namespace: "myns",
},
},
Copy link
Member

Choose a reason for hiding this comment

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

And this?

Copy link
Member Author

@Sunnatillo Sunnatillo Jul 26, 2023

Choose a reason for hiding this comment

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

When IpAddress created, it will update ipClaimStatus firtst and then will proceed with ip address creation. Here somehow we did not include status in IpClaim which is causing an error in current testcase. Not sure how it was passing before.

Copy link
Member

Choose a reason for hiding this comment

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

Interesting, it shouldn't have passed if thats the case.

Copy link
Member Author

Choose a reason for hiding this comment

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

It was actually due to status handling changes in CR v0,15.0. Fixed now

@Sunnatillo Sunnatillo force-pushed the bump-capi-v1.5.0-beta.1/sunnat branch from f1374fe to 466b2b2 Compare July 25, 2023 08:37
@metal3-io-bot metal3-io-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 25, 2023
@Sunnatillo Sunnatillo force-pushed the bump-capi-v1.5.0-beta.1/sunnat branch 3 times, most recently from 36acb9a to a007085 Compare July 26, 2023 13:27
@Sunnatillo Sunnatillo changed the title WIP: Bump capi v1.5.0-beta.1 and golang version to v1.20 WIP: Bump capi v1.5.0 Jul 26, 2023
@metal3-io-bot
Copy link
Contributor

metal3-io-bot commented Jul 26, 2023

@Sunnatillo: 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
golangci-lint 466b2b2 link true /test golangci-lint

Full PR test history. Your PR dashboard.

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.

Copy link
Member

@kashifest kashifest left a comment

Choose a reason for hiding this comment

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

You need to bump controller-runtime in api/go.mod as well to v0.15.0

@Sunnatillo Sunnatillo force-pushed the bump-capi-v1.5.0-beta.1/sunnat branch from a007085 to 75c0613 Compare July 26, 2023 15:18
@Sunnatillo Sunnatillo changed the title WIP: Bump capi v1.5.0 Bump capi v1.5.0 Jul 26, 2023
@metal3-io-bot metal3-io-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 26, 2023
@Sunnatillo Sunnatillo force-pushed the bump-capi-v1.5.0-beta.1/sunnat branch from 75c0613 to fd4fc3a Compare July 26, 2023 15:31
@Sunnatillo
Copy link
Member Author

/test-centos-e2e-integration-main
/test-ubuntu-integration-main

@Sunnatillo
Copy link
Member Author

/test-ubuntu-integration-main

Copy link
Member

@kashifest kashifest left a comment

Choose a reason for hiding this comment

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

Very good job. Few small nits inline. This PR is in pretty good shape.

- stylecheck
- thelper
- typecheck
- unconvert
- unused
- varcheck
Copy link
Member

Choose a reason for hiding this comment

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

Can you please add some explanation about removing these checks in the PR description?

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.4
controller-gen.kubebuilder.io/version: v0.12.1
Copy link
Member

Choose a reason for hiding this comment

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

CAPI is sitting currently on v0.12.0. Its fine for now since its a patch version but lets wait for CAPI to bump this for future bumps.

@@ -4,8 +4,8 @@ go 1.20

require (
github.com/jteeuwen/go-bindata v3.0.7+incompatible
k8s.io/code-generator v0.26.1
sigs.k8s.io/controller-tools v0.11.4
k8s.io/code-generator v0.27.1
Copy link
Member

Choose a reason for hiding this comment

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

you have bumped other k8s packages to v0.27.2 in root go.mod and api/go.mod. Can you check if we can do the same for this package.

Name: "abcpref-192-168-1-11",
Namespace: "myns",
},
},
Copy link
Member

Choose a reason for hiding this comment

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

Interesting, it shouldn't have passed if thats the case.

@kashifest
Copy link
Member

/retitle Bump CAPI to v1.5.0, controller-runtime to v0.15.0 and controller-tools to v0.12.1

@metal3-io-bot metal3-io-bot changed the title Bump capi v1.5.0 Bump CAPI to v1.5.0, controller-runtime to v0.15.0 and controller-tools to v0.12.1 Jul 27, 2023
@Sunnatillo Sunnatillo force-pushed the bump-capi-v1.5.0-beta.1/sunnat branch from fd4fc3a to c81b271 Compare July 27, 2023 15:33
@Sunnatillo
Copy link
Member Author

/test-centos-e2e-integration-main
/test-ubuntu-integration-main

kashifest
kashifest previously approved these changes Jul 27, 2023
@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 27, 2023
@Sunnatillo
Copy link
Member Author

/cc @smoshiur1237

@Sunnatillo
Copy link
Member Author

Sunnatillo commented Jul 28, 2023

/hold
need check the changes

@metal3-io-bot metal3-io-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 28, 2023
@@ -416,7 +422,7 @@ var _ = Describe("IPPool manager", func() {
},
Status: ipamv1.IPClaimStatus{
Address: &corev1.ObjectReference{
Name: "abcpref-192-168-1-12",
Name: "abcpref-192-168-1-10",
Copy link
Member

Choose a reason for hiding this comment

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

Would you please check if this is correct? I think it doesn't need this change.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, thank you for noticing. Fixed it.

remove deprecated linters(varcheck, structcheck, deadcode)
@Sunnatillo Sunnatillo force-pushed the bump-capi-v1.5.0-beta.1/sunnat branch from c81b271 to cbaa4b4 Compare July 28, 2023 13:21
@metal3-io-bot metal3-io-bot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 28, 2023
@Sunnatillo
Copy link
Member Author

/test-centos-e2e-integration-main
/test-ubuntu-integration-main

@Sunnatillo
Copy link
Member Author

/unhold

@metal3-io-bot metal3-io-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 28, 2023
Copy link
Member

@smoshiur1237 smoshiur1237 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix.
/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2023
@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kashifest

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

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 1, 2023
@metal3-io-bot metal3-io-bot merged commit 623678c into metal3-io:main Aug 1, 2023
2 checks passed
@Sunnatillo Sunnatillo deleted the bump-capi-v1.5.0-beta.1/sunnat branch August 15, 2023 11:50
@furkatgofurov7
Copy link
Member

/retitle ⚠️ Bump CAPI to v1.5.0, controller-runtime to v0.15.0 and controller-tools to v0.12.1

@furkatgofurov7 furkatgofurov7 changed the title Bump CAPI to v1.5.0, controller-runtime to v0.15.0 and controller-tools to v0.12.1 ⚠️ Bump CAPI to v1.5.0, controller-runtime to v0.15.0 and controller-tools to v0.12.1 Aug 17, 2023
@Sunnatillo Sunnatillo mentioned this pull request Aug 28, 2023
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. lgtm Indicates that a PR is ready to be merged. 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