What happened:
Under in a situation, build does not start.
What you expected to happen:
Every build starts as usual.
How to reproduce it:

@yuichi10 This is a bug with blockedBy self job feature. We have now put this behind a feature flag. Set this https://github.com/screwdriver-cd/queue-worker/blob/master/config/custom-environment-variables.yaml#L148 to "false" in your environment to unblock for now, while we fix the underlying issue.
@yuichi10 Thanks for making an issue.
We made a couple fixes to mitigate it. Please pull in queue-worker version queue-worker:v1.12.9. and set PLUGIN_BLOCKEDBY_BLOCKED_BY_SELF to "false"
The root cause is here: https://github.com/screwdriver-cd/executor-queue/blob/master/index.js#L307-L323
Previously, there are 2 scenarios: build is either in the queue or picked up by the worker.
If in the queue, we delete it from the queue
If in the worker, we call job stop: https://github.com/screwdriver-cd/queue-worker/blob/master/lib/jobs.js#L75-L96
However, we introduced reEnqueue. The problem happens when a build is aborted and it is being picked up by the worker. Therefore it's not deleted from the queue and gets picked up again. We need to implement extra steps to clean up inside beforePerform.
Thanks for your advice!
Now the Screwdriver work well.
Previously, we addressed this case by adding delete key:
delete key, and call stop which cleans up waiting key beforePerform, it does clean up and will not proceed. There is a new edge case scenario I found:
delete key, waiting key remainsbeforePerform to clean up. waiting key still contains this buildId, so subsequent builds cannot be started. Will open PRs to address this new edge case
@yuichi10 I think this issue is resolved
Please pull in v1.12.11 for worker and set PLUGIN_BLOCKEDBY_BLOCKED_BY_SELF to "true"
Also, please pull in v0.5.370 for the API
@yuichi10 When possible, can you confirm it is working for you? If it is working, you can close the issue. If it's not working, please let me know! Thank you!
Closing this. Please re-open if issue is seen again.
It work well!!
Thank you!!!
Most helpful comment
@yuichi10 I think this issue is resolved
Please pull in
v1.12.11forworkerand setPLUGIN_BLOCKEDBY_BLOCKED_BY_SELFto"true"Also, please pull in
v0.5.370for theAPI