Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Bug: Fix pipeline run complete state machine #4053

Merged
merged 4 commits into from
Oct 17, 2022

Conversation

briancain
Copy link
Member

@briancain briancain commented Oct 14, 2022

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

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 briancain added the pr/no-changelog No automatic changelog entry required for this pull request label Oct 14, 2022
@briancain briancain requested review from a team, catsby and xiaolin-ninja October 14, 2022 16:48
@github-actions github-actions bot added the core label Oct 14, 2022
Copy link
Contributor

@xiaolin-ninja xiaolin-ninja left a 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.

Copy link
Contributor

@xiaolin-ninja xiaolin-ninja left a 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. :)

Base automatically changed from feat/pipelines/reattach-pipeline-run to main October 17, 2022 20:41
@briancain briancain merged commit 5f63cd6 into main Oct 17, 2022
@briancain briancain deleted the bug/pipeline_run/fix-complete-pipeline branch October 17, 2022 20:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/0.10.x core pr/no-changelog No automatic changelog entry required for this pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pipelines: Pipeline Run state machine isn't updating on completion
3 participants