This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 327
Bug: Fix pipeline run complete state machine #4053
Merged
Merged
Conversation
This file contains 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
Prior to this commit, when we'd go to complete a pipeline run, we would only look at the "last" job in the jobs slice for a pipeline run message. This check doesn't seem to work anymore, and relying on the last job in a slice can be fragile. This commit fixes this behavior by checking all job ids in a pipeline run and seeing if they have finished as well before attempting to mark the pipeline run as a success. Fixes #4032
briancain
added
the
pr/no-changelog
No automatic changelog entry required for this pull request
label
Oct 14, 2022
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.
Looks like we're already hitting the edge case, left my thoughts on the loop & a rewording suggestion.
evanphx
approved these changes
Oct 17, 2022
xiaolin-ninja
approved these changes
Oct 17, 2022
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.
Ok! Looks good to me for a temporary fix until something more efficient comes along. :)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
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.
This pull request fixes a bug where the boltdb state for a pipeline run would never mark a finished pipeline as success and would be stuck in running forever. It fixes it by looking at all job references on a run and seeing if they are also complete before marking the pipeline as complete.
Fixes #4032