-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix waitTime and approval task blocking each other #1063
Conversation
bf7ab38
to
83f9e25
Compare
} | ||
} else { | ||
// Approved state should not change once the approval is accepted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Approved state should not change once the approval is accepted. | |
// We land here only if the approval is accepted. Approved state should not change once the approval is accepted. |
@@ -181,7 +173,355 @@ var _ = Describe("UpdateRun execution tests", func() { | |||
clusterResourceOverride = nil | |||
}) | |||
|
|||
Context("Cluster staged update run should update clusters one by one", Ordered, func() { | |||
Context("Cluster staged update run should update clusters one by one - strategy with double afterStageTasks", Ordered, func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a way to avoid copy paste the a large part of the test case?
@@ -753,7 +753,7 @@ func generateSucceededInitializationStatus( | |||
updateStrategy *placementv1beta1.ClusterStagedUpdateStrategy, | |||
clusterResourceOverride *placementv1alpha1.ClusterResourceOverrideSnapshot, | |||
) *placementv1beta1.StagedUpdateRunStatus { | |||
return &placementv1beta1.StagedUpdateRunStatus{ | |||
status := &placementv1beta1.StagedUpdateRunStatus{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we are reusing util functions across the different integration tests suites. Maybe we can move them all into a common test_util file just like the e2e does? Not blocking this PR.
Description of your changes
Fix an issue that when both Timedwait and Approval after-stage tasks are present, it might block each other: the ApprovalReq is only created after wait time has passed; the wait time check is only done when the ApprovalReq is approved.
Fixes #
I have:
make reviewable
to ensure this PR is ready for review.How has this code been tested
Special notes for your reviewer