chore: bump the all-others group across 1 directory with 14 updates - #776
chore: bump the all-others group across 1 directory with 14 updates#776dependabot[bot] wants to merge 5 commits into
Conversation
|
Dependabot (@dependabot) recreate |
860e726 to
7280c3d
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
d8d820f to
8da4d74
Compare
There was a problem hiding this comment.
Pull request overview
Updates the Go dependency stack and adapts KubeFleet to newer Kubernetes/controller-runtime APIs.
Changes:
- Bumps direct and transitive Go dependencies.
- Migrates controllers to structured Event recorders.
- Updates tests for changed Kubernetes, apply, JSON, and fake-client APIs.
Reviewed changes
Copilot reviewed 32 out of 33 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
go.mod |
Updates dependency versions. |
go.sum |
Refreshes dependency checksums. |
cmd/hubagent/workload/setup.go |
Migrates hub event recorders. |
cmd/memberagent/main.go |
Migrates member event recorder. |
pkg/controllers/internalmembercluster/v1beta1/member_controller.go |
Adopts structured Events. |
pkg/controllers/internalmembercluster/v1beta1/member_controller_test.go |
Updates and expands event tests. |
pkg/controllers/membercluster/v1beta1/membercluster_controller.go |
Migrates member-cluster Events. |
pkg/controllers/membercluster/v1beta1/membercluster_controller_test.go |
Updates fake event recorders. |
pkg/controllers/placement/controller.go |
Migrates placement Events. |
pkg/controllers/placement/controller_test.go |
Updates recorder fixtures. |
pkg/controllers/placement/placement_status_test.go |
Updates recorder fixtures. |
pkg/controllers/placement/suite_test.go |
Uses the new manager recorder. |
pkg/controllers/resourcechange/resourcechange_controller.go |
Updates recorder type. |
pkg/controllers/rollout/controller.go |
Migrates rollout recorders. |
pkg/controllers/updaterun/controller.go |
Migrates update-run recorders. |
pkg/controllers/workapplier/controller.go |
Updates recorder interface. |
pkg/controllers/workapplier/suite_test.go |
Updates integration recorders. |
pkg/controllers/workgenerator/controller.go |
Migrates work-generator recorders. |
pkg/controllers/workgenerator/controller_test.go |
Updates recorder fixtures. |
pkg/controllers/workgenerator/envelope.go |
Migrates envelope warning Event. |
pkg/controllers/workgenerator/envelope_test.go |
Updates Event tests. |
pkg/resourcewatcher/change_detector_test.go |
Uses the newer fake clientset. |
pkg/resourcewatcher/informer_populator_test.go |
Uses the newer fake clientset. |
pkg/scheduler/framework/framework.go |
Migrates framework recorder API. |
pkg/scheduler/framework/framework_test.go |
Tests the new recorder type. |
pkg/scheduler/framework/plugins/clustereligibility/plugin_test.go |
Updates mock recorder type. |
pkg/scheduler/scheduler.go |
Migrates scheduler recorder API. |
pkg/utils/controller/resource_selector_resolver_test.go |
Adapts renamed Kubernetes types. |
pkg/utils/test_util.go |
Updates fake Event utilities. |
pkg/utils/test_util_test.go |
Adds utility tests. |
pkg/webhook/clusterresourceplacement/v1beta1_clusterresourceplacement_mutating_webhook_test.go |
Adapts JSON number expectations. |
pkg/webhook/validation/uservalidation.go |
Uses standard-library slices. |
test/upgrade/before/scenarios_test.go |
Adapts server-side apply usage. |
Suppressed comments (1)
pkg/controllers/internalmembercluster/v1beta1/member_controller_test.go:142
- These new checks use testify assertions, while this repository's test convention disallows assert libraries. Use direct
testingchecks andcmp.Diffinstead.
assert.Equal(t, expected, event, utils.TestCaseMsg, "TestMarkInternalMemberClusterLeaveFailed")
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.5.20 | ||
| sigs.k8s.io/cluster-inventory-api v0.0.0-20251028164203-2e3fabb46733 | ||
| sigs.k8s.io/controller-runtime v0.22.4 | ||
| sigs.k8s.io/controller-runtime v0.23.1 |
There was a problem hiding this comment.
Done.
Real production bug — the events.k8s.io/v1 recorder writes to the events.k8s.io group, and envtest does not enforce RBAC, so events would have been silently dropped in deployed clusters. Both chart templates now grant create/patch on events in the core and events.k8s.io groups, and pkg/utils/common.go gained a narrow EventsK8sIoRule (create/patch only — the recorder sink never reads) that is appended to the generated per-member hub Role.
| assert.Equal(t, expected, event, utils.TestCaseMsg, "TestMarkInternalMemberClusterJoinFailed") | ||
|
|
||
| // Check expected condition. | ||
| expectedCondition := metav1.Condition{Type: string(clusterv1beta1.AgentJoined), Status: metav1.ConditionUnknown, Reason: EventReasonInternalMemberClusterFailedToJoin, Message: joinErr.Error()} | ||
| actualCondition := internalMemberCluster.GetConditionWithType(clusterv1beta1.MemberAgent, expectedCondition.Type) | ||
| assert.Equal(t, "", cmp.Diff(expectedCondition, *(actualCondition), cmpopts.IgnoreTypes(time.Time{})), utils.TestCaseMsg, "TestMarkInternalMemberClusterJoinFailed") |
There was a problem hiding this comment.
Done. Both tests rewritten with direct testing checks and cmp.Diff, per CLAUDE.md. Pre-existing testify usage elsewhere in the file is left alone to keep this PR scoped to the dependency bump.
0ab1dc8 to
0b8e2c7
Compare
Bumps the all-others group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github.com/crossplane/crossplane-runtime/v2](https://github.com/crossplane/crossplane-runtime) | `2.1.0` | `2.3.3` | | [github.com/go-logr/logr](https://github.com/go-logr/logr) | `1.4.3` | `1.4.4` | | [github.com/wI2L/jsondiff](https://github.com/wI2L/jsondiff) | `0.6.0` | `0.7.1` | | [go.goms.io/fleet-networking](https://github.com/Azure/fleet-networking) | `0.3.3` | `0.3.40` | | [golang.org/x/sync](https://github.com/golang/sync) | `0.21.0` | `0.22.0` | Updates `github.com/crossplane/crossplane-runtime/v2` from 2.1.0 to 2.3.3 - [Release notes](https://github.com/crossplane/crossplane-runtime/releases) - [Changelog](https://github.com/crossplane/crossplane-runtime/blob/main/RELEASE.md) - [Commits](crossplane/crossplane-runtime@v2.1.0...v2.3.3) Updates `github.com/go-logr/logr` from 1.4.3 to 1.4.4 - [Release notes](https://github.com/go-logr/logr/releases) - [Changelog](https://github.com/go-logr/logr/blob/master/CHANGELOG.md) - [Commits](go-logr/logr@v1.4.3...v1.4.4) Updates `github.com/onsi/ginkgo/v2` from 2.23.4 to 2.27.2 - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](onsi/ginkgo@v2.23.4...v2.27.2) Updates `github.com/onsi/gomega` from 1.37.0 to 1.38.3 - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](onsi/gomega@v1.37.0...v1.38.3) Updates `github.com/prometheus/client_golang` from 1.22.0 to 1.23.2 - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.22.0...v1.23.2) Updates `github.com/spf13/cobra` from 1.9.1 to 1.10.2 - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](spf13/cobra@v1.9.1...v1.10.2) Updates `github.com/spf13/pflag` from 1.0.6 to 1.0.10 - [Release notes](https://github.com/spf13/pflag/releases) - [Commits](spf13/pflag@v1.0.6...v1.0.10) Updates `github.com/stretchr/testify` from 1.10.0 to 1.11.1 - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](stretchr/testify@v1.10.0...v1.11.1) Updates `github.com/wI2L/jsondiff` from 0.6.0 to 0.7.1 - [Release notes](https://github.com/wI2L/jsondiff/releases) - [Commits](wI2L/jsondiff@v0.6.0...v0.7.1) Updates `go.goms.io/fleet-networking` from 0.3.3 to 0.3.40 - [Release notes](https://github.com/Azure/fleet-networking/releases) - [Commits](Azure/fleet-networking@v0.3.3...v0.3.40) Updates `go.uber.org/zap` from 1.27.0 to 1.27.1 - [Release notes](https://github.com/uber-go/zap/releases) - [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md) - [Commits](uber-go/zap@v1.27.0...v1.27.1) Updates `golang.org/x/sync` from 0.21.0 to 0.22.0 - [Commits](golang/sync@v0.21.0...v0.22.0) Updates `golang.org/x/time` from 0.11.0 to 0.15.0 - [Commits](golang/time@v0.11.0...v0.15.0) Updates `gomodules.xyz/jsonpatch/v2` from 2.4.0 to 2.5.0 - [Release notes](https://github.com/gomodules/jsonpatch/releases) - [Changelog](https://github.com/gomodules/jsonpatch/blob/release-2.0/CHANGELOG.md) - [Commits](gomodules/jsonpatch@v2.4.0...v2.5.0) --- updated-dependencies: - dependency-name: github.com/crossplane/crossplane-runtime/v2 dependency-version: 2.3.3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-others - dependency-name: github.com/go-logr/logr dependency-version: 1.4.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all-others - dependency-name: github.com/onsi/ginkgo/v2 dependency-version: 2.27.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-others - dependency-name: github.com/onsi/gomega dependency-version: 1.38.3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-others - dependency-name: github.com/prometheus/client_golang dependency-version: 1.23.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-others - dependency-name: github.com/spf13/cobra dependency-version: 1.10.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-others - dependency-name: github.com/spf13/pflag dependency-version: 1.0.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all-others - dependency-name: github.com/stretchr/testify dependency-version: 1.11.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-others - dependency-name: github.com/wI2L/jsondiff dependency-version: 0.7.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-others - dependency-name: go.goms.io/fleet-networking dependency-version: 0.3.39 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all-others - dependency-name: go.uber.org/zap dependency-version: 1.27.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all-others - dependency-name: golang.org/x/sync dependency-version: 0.22.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-others - dependency-name: golang.org/x/time dependency-version: 0.15.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-others - dependency-name: gomodules.xyz/jsonpatch/v2 dependency-version: 2.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-others ... Signed-off-by: dependabot[bot] <support@github.com>
…tch 2.5) The all-others group update pulls in controller-runtime 0.23 and jsonpatch 2.5 transitively, which deprecate several APIs and change test-visible behavior. Code adaptations, with no lint suppressions: - Migrate all controllers and the scheduler from the deprecated manager.GetEventRecorderFor (core/v1 events) to GetEventRecorder (events.k8s.io/v1), including fake recorders in tests. - Use the new typed client.Apply API instead of the deprecated client.Apply patch in the upgrade test. - Replace deprecated k8s.io/utils/strings/slices, fake.NewSimpleClientset, and corev1 service policy type aliases with their replacements. - Update TestMutatingHandle expectations for jsonpatch v2.5.0, which now decodes numbers as json.Number (wire format unchanged). - Fix the member cluster left event to use the MemberClusterLeft reason instead of MemberClusterJoined. Signed-off-by: Yetkin Timocin <ytimocin@microsoft.com>
Add unit tests for the test utility matchers and fake recorder helpers, the scheduler framework EventRecorder accessor, and the internal member cluster join/leave failure markers, covering lines flagged by the patch coverage check. Signed-off-by: Yetkin Timocin <ytimocin@microsoft.com>
The controllers now record events through the events.k8s.io recorder, which writes Event objects in the events.k8s.io API group, but the hub and member agent roles only granted the core group. Without this the recorder calls are rejected in deployed clusters and controller events are silently lost. Grant both groups so clients reading legacy core events keep working. Also drop the assertion library from the new marker tests, per the repository test conventions. Signed-off-by: Yetkin Timocin <ytimocin@microsoft.com>
The events.k8s.io recorder sets the recorder name as the Event's reportingController field, which the API server validates as a qualified name; the legacy core/v1 path never did. Two work generator recorders were registered with spaces in their names, so every Event they emit would be rejected as invalid. The only emitter on them is the duplicate envelope Work warning, which is the operator-visible signal that manual cleanup is required, and the unit tests use a fake recorder so the rejection would not surface until runtime. Also grant events.k8s.io through a dedicated rule limited to create and patch, the only verbs the recorder's sink issues, instead of extending the broader core event verbs to the new group. Signed-off-by: Yetkin Timocin <ytimocin@microsoft.com>
0b8e2c7 to
46c45cf
Compare
Upgrade note
This PR moves the agents from
manager.GetEventRecorderFor(core/v1) tomanager.GetEventRecorder(events.k8s.io/v1), changing which API group Eventsare written to.
create/patchoneventsin both the core andevents.k8s.iogroups.Installs using hand-maintained RBAC must add the
events.k8s.iograntthemselves; without it the agents keep running and silently stop emitting
Events, with no degraded condition and no controller error.
(
kubectl get events, custom controllers, alerting) will not seeagent-emitted Events unless it reads
events.k8s.io/v1, where fields arerenamed —
noteformessage,regardingforinvolvedObject.Bumps the all-others group with 5 updates in the / directory:
2.1.02.3.31.4.31.4.40.6.00.7.10.3.30.3.400.21.00.22.0Updates
github.com/crossplane/crossplane-runtime/v2from 2.1.0 to 2.3.3Release notes
Sourced from github.com/crossplane/crossplane-runtime/v2's releases.
... (truncated)
Commits
fcf6aaaMerge pull request #1040 from lsviben/bump-k8schain-release-2.31917f1dfix(deps): bump k8schain to drop transitive docker/docker dependencybee99c6Merge pull request #1038 from adamwg/awg/backport-ghsa8fcc604fix(xpkg): pin Fetch to the verified digest3832144Merge pull request #1007 from crossplane/renovate/release-2.3-go-golang.org-x...da9e2d2chore(deps): update module golang.org/x/net to v0.55.0 [security]dce7428Merge pull request #999 from crossplane/renovate/release-2.3-go-golang.org-x-...6e56524chore(deps): bump gomod2nix.toml via nix run .#tidyf5e37c5chore(deps): update module golang.org/x/crypto to v0.52.0 [security]1ed37b5Merge pull request #993 from crossplane/renovate/main-go-github.com-in-toto-i...Updates
github.com/go-logr/logrfrom 1.4.3 to 1.4.4Release notes
Sourced from github.com/go-logr/logr's releases.
Commits
96a9abaFix lint51c6302Better implementation of pointer recursion checkingc667114funcr: Handle and test recursive valuesf7ffadbAdd benchmark for pointer argse2a3c8efuncr: bound slog.Group nesting depth to prevent stack overflow2886d2bbuild(deps): bump actions/setup-go from 6.5.0 to 7.0.00b40896build(deps): bump github/codeql-action/upload-sarif77f671bBump to Go 1.26cce283fbuild(deps): bump golangci/golangci-lint-action from 9.2.1 to 9.3.03832a11build(deps): bump github/codeql-action/upload-sarifUpdates
github.com/onsi/ginkgo/v2from 2.23.4 to 2.27.2Release notes
Sourced from github.com/onsi/ginkgo/v2's releases.
... (truncated)
Changelog
Sourced from github.com/onsi/ginkgo/v2's changelog.
... (truncated)
Commits
9a84c21v2.27.2a69113ainline automaxprocs to simplify dependencies; this will be removed when Go 1....a99c6e0Fix syntax errors and typof993df5Fix paragraph position error56cb393v2.27.12ce3f13reporters: add enhanced bounds checking in emitTimeline to prevent slice panicacf208aAdding check for malformed date51090a8Updating after docs run606c1cbFix Ginkgo Reporter slice-bounds panica6463b3Bug Fix: Add GinkoTBWrapper.Attr() and GinkoTBWrapper.Output()Updates
github.com/onsi/gomegafrom 1.37.0 to 1.38.3Release notes
Sourced from github.com/onsi/gomega's releases.
Changelog
Sourced from github.com/onsi/gomega's changelog.
Commits
a3ca2cav1.38.34dada36fix failing have http testsd40c691make string formatitng more consistent for users who use format.Object directly2a37b46doc: fix typosee26170docs: fix HaveValue examplecc85c05Bump actions/setup-go from 5 to 6 (#866)8905788Bump github.com/onsi/ginkgo/v2 from 2.25.1 to 2.25.3 (#865)67552c5chore: apply fixes from Go modernize command79b8a75v1.38.2c404969roll back to go 1.23.0Updates
github.com/prometheus/client_golangfrom 1.22.0 to 1.23.2Release notes
Sourced from github.com/prometheus/client_golang's releases.
... (truncated)
Changelog
Sourced from github.com/prometheus/client_golang's changelog.
Commits
8179a56Cut v1.23.2 (#1870)4142b59Merge pull request #1869 from prometheus/arve/upgrade-common4ff40f0Cut v1.23.1 (#1867)989b029Upgrade to prometheus/common v0.66 (#1866)e4b2208Cut v1.23.0 (#1848)d9492afcut v1.23.0-rc.1 (#1842)aeae8a0Cut v1.23.0-rc.0 (#1837)b157309Update common Prometheus files (#1832)a704e28build(deps): bump the github-actions group with 3 updates (#1826)c774311Fix errNotImplemented reference (#1835)Updates
github.com/spf13/cobrafrom 1.9.1 to 1.10.2Release notes
Sourced from github.com/spf13/cobra's releases.
... (truncated)
Commits
88b30abchore: Migrate from gopkg.in/yaml.v3 to go.yaml.in/yaml/v3 (#2336)346d408fix: actions/setup-go v6 (#2337)fc81d20refactor: change minUsagePadding from var to const (#2325)117698arefactor: replace several vars with consts (#2328)e2dd29dAdd documentation for repeated flags functionality (#2316)0629892Fix linter (#2327)7da941cchore: Bump pflag to v1.0.9 (#2305)51d6751Bump pflag to 1.0.8 (#2303)3f3b818Update README.md with new logodcaf42eAdd Periscope to the list of projects using Cobra (#2299)Updates
github.com/spf13/pflagfrom 1.0.6 to 1.0.10Release notes
Sourced from github.com/spf13/pflag's releases.
... (truncated)
Commits
0491e57Merge pull request #448 from thaJeztah/fix_go_version72abab1Merge pull request #447 from thaJeztah/fix_deprecation_comment7e4dfb1Test on Go 1.1218a9d17move Func, BoolFunc, tests as they require go1.21c5b9e98remove uses of errors.Is, which requires go1.1345a4873fix deprecation comment for (FlagSet.)ParseErrorsWhitelist1043857Merge pull request #446 from spf13/fix-backwards-compat7412009fix: Restore ParseErrorsWhitelist name for nowb9c16faMerge pull request #444 from spf13/reset-args-even-if-empty40abc49Merge pull request #443 from spf13/silence-errhelpUpdates
github.com/stretchr/testifyfrom 1.10.0 to 1.11.1Release notes
Sourced from github.com/stretchr/testify's releases.
... (truncated)
Commits
2a57335Merge pull request #1788 from brackendawson/1785-backport-1.11af8c912Backport #1786 to release/1.11b7801fbMerge pull request #1778 from stretchr/dependabot/github_actions/actions/chec...69831f3build(deps): bump actions/checkout from 4 to 5a53be35Improve captureTestingT helperaafb604mock: improve formatting of error message7218e03improve error msg929a212Merge pull request #1758 from stretchr/dolmen/suite-faster-method-filteringbc7459esuite: faster filtering of methods (-testify.m)7d37b5csuite: refactor methodFilterUpdates
github.com/wI2L/jsondifffrom 0.6.0 to 0.7.1Release notes
Sourced from github.com/wI2L/jsondiff's releases.
Commits
cc66287fix: factorization dropping operations when paths share a string prefix65fb3batest: add go1.26 to test matrix0f546eachore:...Description has been truncated