Repository navigation
feat: Supports using controllerrevision hash to update role - #34
Merged
Merged
Conversation
bcfre
force-pushed
the
dev-0922
branch
4 times, most recently
from
September 22, 2025 08:30
0d2c424 to
1ac3b31
Compare
Collaborator
|
@bcfre Please fix the conflict issue. thanks. |
cheyang
requested changes
Sep 23, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds ControllerRevision support to enable tracking and future rollback capabilities for RoleBasedGroup deployments. The implementation creates ControllerRevisions to store RBG state snapshots and uses revision hashes to detect changes that require workload updates.
- Implements ControllerRevision creation and lifecycle management for RBG state tracking
- Adds revision hash labels to both ControllerRevisions and workload resources for change detection
- Updates all workload reconcilers to include revision tracking in their reconciliation logic
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/utils/revision_utils.go | Core revision management utilities including creation, cleanup, and hashing |
| pkg/utils/revision_utils_test.go | Unit tests for revision utilities and cleanup functionality |
| internal/controller/workloads/rolebasedgroup_controller.go | Main controller updates to integrate revision management |
| pkg/reconciler/*_reconciler.go | Updates to StatefulSet, LeaderWorkerSet, and Deployment reconcilers for revision support |
| api/workloads/v1alpha1/constant.go | New constants for revision-related labels and keys |
| test/utils/utils.go | Increased timeout for e2e tests |
| test/wrappers/rbg_wrapper.go | Added test wrapper method for PodGroupPolicy |
| config/rbac/rbgs_controller_role.yaml | Added RBAC permissions for ControllerRevision resources |
| go.mod | Moved go-spew dependency from indirect to direct |
Comments suppressed due to low confidence (1)
pkg/utils/revision_utils.go:1
- Debug print statement should be removed from production code or replaced with proper logging.
package utils
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
gujingit
reviewed
Sep 23, 2025
cheyang
reviewed
Sep 23, 2025
cheyang
reviewed
Sep 23, 2025
cheyang
reviewed
Sep 23, 2025
cheyang
reviewed
Sep 24, 2025
cheyang
reviewed
Sep 24, 2025
cheyang
requested changes
Sep 24, 2025
bcfre
force-pushed
the
dev-0922
branch
2 times, most recently
from
September 28, 2025 03:15
ca8af6c to
d6a2f69
Compare
cheyang
requested changes
Oct 4, 2025
…update the role under rbg Signed-off-by: bcfre <guo0xiong1feng@gmail.com>
Signed-off-by: 柏存 <guoxiongfeng.gxf@alibaba-inc.com>
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.
Ⅰ. Motivation
Ⅱ. Modifications
Added two types of labels: RBG and specific role.
Added logic for creating and cleaning up ControllerRevisions.
Ⅲ. Does this pull request fix one issue?
fixes #21
Ⅳ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
Add ut and update e2e
Ⅴ. Describe how to verify it
VI. Special notes for reviews
Checklist
make fmt.