Merged
Conversation
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
12bd0da to
5431aad
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves e2e test reliability and fixes race conditions in the RBG controller's status management. It adds a CRD verification step to the CI workflow, refactors debug dump functions, and fixes SSA (Server-Side Apply) field ownership conflicts between the RBG controller and the pod controller for status conditions.
Changes:
- Replaces
ginkgo.DeferCleanupwithf.RegisterDebugFnin v1alpha2 e2e tests and adds comprehensive cleanup (resource deletion + pod wait) inAfterEach, with a CRD verification step in CI. - Fixes SSA race condition where the RBG controller could overwrite the pod controller's
RestartInProgresscondition by filtering conditions per field manager and includingRoleStatuses/ObservedGenerationin both managers' apply configs. - Improves debug dump functions to correctly dispatch by workload type (Deployment, StatefulSet, LWS, RoleInstanceSet) instead of only checking leader-worker vs standalone pattern.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/e2e/framework/framework.go | Adds RegisterDebugFn, resource cleanup in AfterEach, and pod deletion wait |
| test/e2e/testcase/v1alpha2/debug.go | Switches workload-type dispatch to use role.Workload.String(), adds Deployment and RoleInstanceSet dump functions |
| test/e2e/framework/rbg_v2_expect.go | Simplifies workloadTypeFromRoleV2 to use role.Workload.String() |
| internal/controller/workloads/rolebasedgroup_controller.go | Filters RestartInProgress from RBG controller's SSA patch, adds readyConditionMissing trigger |
| internal/controller/workloads/pod_controller.go | Adds ObservedGeneration and RoleStatuses to pod controller's apply configs, nil guard for ToRoleStatusApplyConfiguration |
| test/e2e/testcase/v1alpha2/revision.go | Wraps generation check in gomega.Eventually, adds debug logging |
| .github/workflows/e2e-test.yml | Adds CRD verification step, updates controller log label selector |
| Makefile | Removes manifests generate fmt vet prerequisites from test-e2e target |
| pkg/reconciler/svc_reconciler_test.go | Adds corev1 scheme registration |
| test/e2e/testcase/v1alpha2/*.go | Migrates all v1alpha2 tests from DeferCleanup to RegisterDebugFn |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| fmt.Printf("[Deployment] Failed to get Deployment: %v\n", err) | ||
| } else { | ||
| fmt.Printf("[Deployment] Status: Replicas=%d, ReadyReplicas=%d, AvailableReplicas=%d, UpdatedReplicas=%d\n", | ||
| *deploy.Spec.Replicas, deploy.Status.ReadyReplicas, deploy.Status.AvailableReplicas, deploy.Status.UpdatedReplicas) |
| if err != nil { | ||
| return false | ||
| } | ||
| ginkgo.By(fmt.Sprintf("Got new RoleInstanceSet, generation: %d (expected: %d)", newRis.Generation, oldRis.Generation+2)) |
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
Ⅲ. Does this pull request fix one issue?
fixes #XXXX
Ⅳ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
Ⅴ. Describe how to verify it
VI. Special notes for reviews
Checklist
make fmt.