fix: fix waitTime and approval task blocking each other#1063
Merged
jwtty merged 2 commits intoAzure:mainfrom Mar 4, 2025
Merged
fix: fix waitTime and approval task blocking each other#1063jwtty merged 2 commits intoAzure:mainfrom
jwtty merged 2 commits intoAzure:mainfrom
Conversation
bf7ab38 to
83f9e25
Compare
ryanzhang-oss
approved these changes
Mar 4, 2025
| } | ||
| } | ||
| } else { | ||
| // Approved state should not change once the approval is accepted. |
Contributor
There was a problem hiding this comment.
Suggested change
| // 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. |
| }) | ||
|
|
||
| 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() { |
Contributor
There was a problem hiding this comment.
is there a way to avoid copy paste the a large part of the test case?
| clusterResourceOverride *placementv1alpha1.ClusterResourceOverrideSnapshot, | ||
| ) *placementv1beta1.StagedUpdateRunStatus { | ||
| return &placementv1beta1.StagedUpdateRunStatus{ | ||
| status := &placementv1beta1.StagedUpdateRunStatus{ |
Contributor
There was a problem hiding this comment.
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.
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
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 reviewableto ensure this PR is ready for review.How has this code been tested
Special notes for your reviewer