Update chainsaw and use go 1.26#62
Open
adamwg wants to merge 3 commits into
Open
Conversation
The latest released version of kyverno/chainsaw breaks when used with go 1.26 because chainsaw depends on the internal `testing.testDeps` interface, which is not guaranteed to be stable and has changed in 1.26. In order to accommodate downstream projects using go 1.26, update our chainsaw dependency. Moving to go 1.26 also requires us to migrate to golangci-lint v2, since there is no v1 release that supports go 1.26. Migrate our configuration with `golangci-lint migrate`. Add `ignore-tests: true` to the `goconst` configuration, since we have a bunch of literals used in test files that are not worth introducing consts for. Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
Previously, our log collection goroutine functions took a `chan bool` for orderly shutdown. We already have contexts in the places that call these, so it's tidier (and makes the linter happy) to pass the contexts and use `ctx.Done()` for shutdown. Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
The Crossplane CLI code has moved into crossplane/cli. Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of your changes
The latest released version of kyverno/chainsaw breaks when used with go 1.26 because chainsaw depends on the internal
testing.testDepsinterface, which is not guaranteed to be stable and has changed in 1.26. In order to accommodate downstream projects using go 1.26, update our chainsaw dependency.Moving to go 1.26 also requires us to migrate to golangci-lint v2, since there is no v1 release that supports go 1.26. Migrate our configuration with
golangci-lint migrate. Addignore-tests: trueto thegoconstconfiguration, since we have a bunch of literals used in test files that are not worth introducing consts for.To appease the updated linter (and because it's a nice improvement), change our log handler goroutine functions to take a context rather than a
chan boolfor shutdown. We already have contexts at the call sites that get cancelled at the same time the old done channels were closed, so this is a straightforward change.I have:
make reviewable testto ensure this PR is ready for review.How has this code been tested
Existing unit and e2e tests.