[Duo Workflow] Duo Workflow can get stuck in "Running" state

Summary

Duo Workflow can get stuck in the "Running" state. Trying to stop it ends up with a message "Workflow stops after the current task completes." but the current task won't complete because the Workflow already died. Restarting VSCode doesn't change the status of the Workflow.

Workflow ID's:

  • 1004437 - stuck in Running
  • 1004440 - Failed
  • 1004441 - Failed

Steps to reproduce

So far it failed three times consistently when I asked:

I am using API calls in a pipeline to create an MR and merge it. The pipeline creates the MR, checks it is open, and then posts a merge call (PUT /projects/:id/merge_requests/:merge_request_iid/merge). However, a 401 is returned. This is despite the user being an owner of the project, so permissions are not the problem. It appears we cannot merge via the API while the pipeline is still running. The pipeline will keep running until the MR is merged, so this creates an infinite loop. Are there any work-arounds in this situation?

The interesting thing is that if I have VSCode in focus it seems to just fail. But when I had it in the background, it got stuck on Running

Example Project

What is the current bug behavior?

What is the expected correct behavior?

Relevant logs and/or screenshots

image

ls.log

workflow.log

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by ŁUKASZ KORBASIEWICZ