fix: ignore deployment.kubernetes.io/revision annotation#322
Merged
Wei Weng (weng271190436) merged 2 commits intokubefleet-dev:mainfrom Nov 13, 2025
Merged
Conversation
a6c6a6a to
bc86a09
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Member
Ryan Zhang (ryanzhang-oss)
left a comment
There was a problem hiding this comment.
We need a e2e that place a deployment to verify this works
added 2 commits
November 10, 2025 21:41
…k applier Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
bc86a09 to
80e9f29
Compare
Copilot started reviewing on behalf of
Wei Weng (weng271190436)
November 11, 2025 16:56
View session
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes issue #319 by ensuring the deployment.kubernetes.io/revision annotation is ignored during resource placement operations. This annotation is automatically set by the Kubernetes deployment controller and should not be considered when comparing resource states during placement.
Key Changes:
- Added logic to filter out the
deployment.kubernetes.io/revisionannotation in resource sanitization - Updated dependencies to include
k8s.io/kubectlpackage for theRevisionAnnotationconstant - Added comprehensive E2E test coverage for deployment placement scenarios
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/controllers/workapplier/apply.go | Added deletion of deployment.RevisionAnnotation in sanitizeManifestObject() |
| pkg/controllers/workapplier/apply_test.go | Added test coverage for revision annotation removal |
| pkg/controllers/placement/resource_selector.go | Added deletion of deployment.RevisionAnnotation in generateRawContent() |
| pkg/controllers/placement/resource_selector_test.go | Added test coverage for revision annotation removal |
| test/e2e/resource_placement_deployment_test.go | New E2E test file for deployment placement scenarios |
| go.mod | Updated k8s.io/metrics version and added k8s.io/kubectl dependency |
| go.sum | Updated checksums for new and upgraded dependencies |
| apis/placement/v1beta1/zz_generated.deepcopy.go | Auto-generated code formatting change (import alias) |
3f97b22 to
80e9f29
Compare
Ryan Zhang (ryanzhang-oss)
approved these changes
Nov 13, 2025
9caeb4e
into
kubefleet-dev:main
63 of 81 checks passed
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
Fixes #319
I have:
make reviewableto ensure this PR is ready for review.How has this code been tested
Special notes for your reviewer