-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix!: return latest workflow for retried-persisted workflows #15030
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!: return latest workflow for retried-persisted workflows #15030
Conversation
Joibel
left a comment
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.
What happens if you have an archived and a live (in cluster) workflow?
Signed-off-by: Elliot Gunton <[email protected]>
7949cd0 to
1d93618
Compare
It will not fall into the archived GetWorkflow path here argo-workflows/server/workflow/workflow_server.go Lines 750 to 752 in 436a8d5
|
|
❌ Cherry-pick failed for 3.7. Please check the workflow logs for details. |
(cherry picked from commit e98b6b3) Signed-off-by: Elliot Gunton <[email protected]> Signed-off-by: Alan Clucas <[email protected]>
(cherry picked from commit e98b6b3) Signed-off-by: Elliot Gunton <[email protected]> Signed-off-by: Alan Clucas <[email protected]>
…pick #15030 for 3.7) (#15032) Signed-off-by: Elliot Gunton <[email protected]> Signed-off-by: Alan Clucas <[email protected]> Co-authored-by: Elliot Gunton <[email protected]>
Fixes #15015
Modifications
GetWorkflowfunction, just log a debug message insteadOrderBy(-startedat)to the database query so we can retrieve the latest workflow (via the subsequentOnefunction)Verification
Tested with
make start PROFILE=postgres UI=trueand thencurl -k http://localhost:2746/api/v1/workflows/argo/<workflow-name>at each stage described in the issue. If there are multiple persisted workflows with the same name (but different uids) then theGetWorkflowendpoint now return the most recently finished workflow, matching non-archived behaviour.