Skip to content
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

[Backport 4.0] Workflow with asynchronous action never stops after another step failure #737

Merged
merged 1 commit into from
May 19, 2021

Conversation

laurentganne
Copy link
Contributor

Pull Request description

Backport to 4.0 of pull request #734

Description of the change

Fixed an issue where a workflow will be seen running forever when a synchronous step failed while an asynchronous run action is taking place at the same time. The asynchronous action was unscheduled as expected but its status was not updated and was seen as running forever.

Fixed also an issue when the asynchronous action is updating its action data: there was no check to see if the action has been unregistered, and the action data was added, leaving an isolated key in consul.

What I did

prov/scheduling/scheduler/consul_test.go
prov/scheduling/scheduler/scheduler_test.go:
Added a test on UpdateActionData()

prov/scheduling/scheduling.go:
Updating action data only when the action data deploymentID key exists

tasks/workflow/worker.go:
On task failure, call endAction()

Description for the changelog

Workflow with asynchronous action never stops after another step failure (GH-733)

Applicable Issues

Closes #733
Backported from #734

@sonarcloud
Copy link

sonarcloud bot commented May 18, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@loicalbertin loicalbertin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 👏

@laurentganne laurentganne merged commit 7de30cd into release/4.0 May 19, 2021
@laurentganne laurentganne deleted the backport40/bugfix/gh-733-action-no-stop branch May 19, 2021 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants