Skip to content

chore: Bump up crossplane-runtime version to v1.19.0#113

Merged
jbw976 merged 12 commits intocrossplane:mainfrom
cychiang:chore-bump-up-crossplane-runtime-to-1-18-0
Apr 21, 2025
Merged

chore: Bump up crossplane-runtime version to v1.19.0#113
jbw976 merged 12 commits intocrossplane:mainfrom
cychiang:chore-bump-up-crossplane-runtime-to-1-18-0

Conversation

@cychiang
Copy link
Collaborator

@cychiang cychiang commented Dec 28, 2024

Description of your changes

  • Bump up crossplane-runtime to v1.19.0
  • Fix linting issue by bumping up build submodules to latest one
  • Add support for metrics that introduced in v1.16.0
  • Update Delete function that required changes in v1.17.0
  • Bump up some dependencies in CI workflow
  • Bump up go version to 1.23
  • Migrate golangci-lint from v1 to v2
  • Bump up workflow for golangci-lint from v3 to v7
  • Bump up push-artifacts to v4 from v3 due to missing v3
  • Migrate config file for golangci-lint from v1 to v2
  • Bump up docker buildx version in CI workflow

This PR is related to crossplane/crossplane#5924, and solve part of it.

Due to build submodules, in order to use the new version of golangci-lint for reviewable do:

GOLANGCILINT_VERSION=2.1.2 make reviewable

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

* Fix linting issue by bumping up build submodules to latest one
* Add support for logs that introduced in v1.17.0
* Add support for metrics that introduced in v1.16.0
* Update Delete function that required changes in v1.17.0
* Bump up go version to 1.22

Signed-off-by: Chuan-Yen Chiang <cychiang0823@gmail.com>
@cychiang cychiang force-pushed the chore-bump-up-crossplane-runtime-to-1-18-0 branch from 065d84b to b53779e Compare December 30, 2024 08:41
…/detail/CVE-2024-45338 issue

Signed-off-by: Chuan-Yen Chiang <cychiang0823@gmail.com>
Copy link
Member

@jbw976 jbw976 left a comment

Choose a reason for hiding this comment

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

very cool to see the classic provider template get some attention! thank you for taking the time to do that 🙇‍♂️

can you provide a few more details about how you tested that these changes work OK? is there a test/dummy provider build that you used the updated template for?

also, what was your general approach to get all these updates? did you follow the model of a particular up to date provider, look at the release notes, etc.?

package version

// Version will be overridden with the current version at build time using the -X linker flag
var Version = "0.0.0"
Copy link
Member

@jbw976 jbw976 Jan 25, 2025

Choose a reason for hiding this comment

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

hmm, interesting to see that the Makefile already seemed to have the GO_LDFLAGS referencing this variable, weird to see that this accompanying file wasn't present too. Maybe the file doesn't actually need to exist, but it's helpful to have in the source tree with this comment explaining how it works?

See the License for the specific language governing permissions and
limitations under the License.
*/ No newline at end of file
// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
Copy link
Member

Choose a reason for hiding this comment

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

did you already see where/how these headers may be used for build tool automation? i haven't seen that myself yet 🤔 i.e., is there more that would be needed besides this header update?

Copy link
Collaborator Author

@cychiang cychiang Jan 25, 2025

Choose a reason for hiding this comment

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

I think I update this part according to the feedback from a PR in provider-upjet-template. It seems related to code generator but not sure about it. 😶‍🌫️ Maybe we don't need this?

@cychiang
Copy link
Collaborator Author

very cool to see the classic provider template get some attention! thank you for taking the time to do that 🙇‍♂️

can you provide a few more details about how you tested that these changes work OK? is there a test/dummy provider build that you used the updated template for?

also, what was your general approach to get all these updates? did you follow the model of a particular up to date provider, look at the release notes, etc.?

My general approach for these updates are based on recent changes from crossplane-runtime. Also will try to use the same dependencies as same as crossplane-runtime.

After I finish the change, I will try to build and run in a local environment to test the template-provider is working or not.

Signed-off-by: Chuan-Yen Chiang <cychiang0823@gmail.com>
Copy link
Member

@jbw976 jbw976 left a comment

Choose a reason for hiding this comment

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

hey there @cychiang, I've got time to help review and test this PR to get it to the finish line now. It'll be needed for crossplane/crossplane#5924 which I'm focusing on right now. There's also another effort popping up in #115, but I'd like to consolidate on this PR since it came first, if you have the time to focus on it right now.

Do you have time to work on this in the short term?

Do you want to take another pass through here and bump to v1.19.0? Maybe you can even add change logs support back in now, since it's time to ship that feature across the provider ecosystem 😉

@cychiang
Copy link
Collaborator Author

@jbw976 Hey, no problem! I will fix it before the end of next week.

* Fix workflow schema issue in lint
* Fix CVE issues in golang.org/x/net and golang.org/x/oauth2 by bumping up version

Signed-off-by: Chuan-Yen Chiang <cychiang0823@gmail.com>
Signed-off-by: Chuan-Yen Chiang <cychiang0823@gmail.com>
Signed-off-by: Chuan-Yen Chiang <cychiang0823@gmail.com>
Signed-off-by: Chuan-Yen Chiang <cychiang0823@gmail.com>
…nt still using v1

Signed-off-by: Chuan-Yen Chiang <cychiang0823@gmail.com>
@cychiang cychiang changed the title chore: Bump up crossplane-runtime version to v1.18.0 chore: Bump up crossplane-runtime version to v1.19.0 Apr 18, 2025
Signed-off-by: Chuan-Yen Chiang <cychiang0823@gmail.com>
Copy link
Collaborator Author

@cychiang cychiang left a comment

Choose a reason for hiding this comment

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

Comments for these changes.

# 'annotations' (i.e. it comments on PRs to point out linter violations).
- name: Lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v7
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is an issue related to golangci-lint-action. It seems some fields are not supported in workflow anymore so the workflow keep reporting a failure on the lint step. Bump it up to v7 to avoid, and golangci to v2.


- name: Publish Artifacts to GitHub
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

v3 is missing in the workflow, bump up to v4 instead.

* Update templates

Signed-off-by: Chuan-Yen Chiang <cychiang0823@gmail.com>
Copy link
Member

@jbw976 jbw976 left a comment

Choose a reason for hiding this comment

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

This mostly looks pretty complete to me @cychiang, thanks for continuing to drive it!

i've left a few comments for you - other than those, what else is left on your side before calling this complete? 👍

* Override variable for golangci-lint in Makefile

Signed-off-by: Chuan-Yen Chiang <cychiang0823@gmail.com>
@cychiang
Copy link
Collaborator Author

This mostly looks pretty complete to me @cychiang, thanks for continuing to drive it!

i've left a few comments for you - other than those, what else is left on your side before calling this complete? 👍

@jbw976 Hey! I think I have completed most of the things I can think about for bumping up the version. I'm going to ignore // +build generate issue, it seems not affect to generate process so I guess should be fine.

Signed-off-by: Chuan-Yen Chiang <cychiang0823@gmail.com>
Copy link
Member

@jbw976 jbw976 left a comment

Choose a reason for hiding this comment

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

This looks good to me, let's get it merged and follow up with the next PR to enable change logs support 💪

@jbw976 jbw976 merged commit 0ac4782 into crossplane:main Apr 21, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants