-
Notifications
You must be signed in to change notification settings - Fork 20
feat: add beforeStageTasks to stagedUpdateRun #328
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
9fee098 to
cdc9f47
Compare
cdc9f47 to
a9b7520
Compare
Signed-off-by: Britania Rodriguez Reyes <[email protected]>
Signed-off-by: Britania Rodriguez Reyes <[email protected]>
Signed-off-by: Britania Rodriguez Reyes <[email protected]>
Signed-off-by: Britania Rodriguez Reyes <[email protected]>
Signed-off-by: Britania Rodriguez Reyes <[email protected]>
Signed-off-by: Britania Rodriguez Reyes <[email protected]>
61f73a9 to
a349d04
Compare
Signed-off-by: Britania Rodriguez Reyes <[email protected]>
Signed-off-by: Britania Rodriguez Reyes <[email protected]>
Signed-off-by: Britania Rodriguez Reyes <[email protected]>
Signed-off-by: Britania Rodriguez Reyes <[email protected]>
Signed-off-by: Britania Rodriguez Reyes <[email protected]>
Signed-off-by: Britania Rodriguez Reyes <[email protected]>
| } | ||
| updatingStage := &updateRunStatus.StagesStatus[updatingStageIndex] | ||
| approved, beforeStageTaskErr := r.checkBeforeStageTasksStatus(ctx, updatingStageIndex, updateRun) | ||
| if beforeStageTaskErr != nil { |
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.
if this err is Aborted, we need to mark stage to be failed: https://github.com/kubefleet-dev/kubefleet/blob/main/pkg/controllers/updaterun/execution.go#L79C3-L82C4. Since multiple such checks exist in this code, please create a defer function.
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.
found a potential bug: calculateMaxConcurrencyValue should return errIsAborted. cc @Arvindthiru please confirm and submit a separate fix PR.
Signed-off-by: Britania Rodriguez Reyes <[email protected]>
Signed-off-by: Britania Rodriguez Reyes <[email protected]>
Description of your changes
I have:
Added a check within update run execution to check for before stage tasks.
Returned unexpected error for TimedWait tasks as a before stage task, otherwise continue with approval task.
Check the different states of approval tasks.
Update the names of the approval requests to differentiate between before and after tasks.
Update current integration and e2e tests to include before stage tasks
Run
make reviewableto ensure this PR is ready for review.How has this code been tested
Special notes for your reviewer