-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Premature key removal in cleanup due to concurrency #144
Comments
@crazy-max any ideas on how this could be solved? I'll give the implementation a shot once there's a plan. |
We struggle with this as well. Error logs from attempting to encrypt deployment secrets via
The actual fingerprint has been replaced by *************. The aforementioned logs from the Post step are identical for us. We are currently executing this action with a concurrency of 7. Most of these steps succeed but 1-3 will always fail. If we re-run those, they will be successful as well. |
There is another error message that we sometimes see when invoking our
Here, the fingerprint has been replaced by ************* and the Post step logs complain about not finding the key as well. |
Behaviour
When multiple runners on the same machine simultaneously run a job using this action it often happens that this action's cleanup in one runner will clean the key out from under the others, causing them to fail.
Steps to reproduce this issue
Consider a job with the following steps:
A: load keys (
uses: uses: crazy-max/ghaction-import-gpg@v5
)B: use keys in various ways
C: Post A (cleanup)
Now consider the case where this job simultaneously runs in runners 1 and 2 in the following order: A1 B1 A2 C1 B2 C2.
Once C1 completes, the key is removed and B2 fails.
The output of C2 is as follows, confirming that the key it is expecting to remove no longer exists:
Expected behaviour
Cleanup in one job should not affect another, so B2 should not fail.
Actual behaviour
Runner 1 removes the key that runner 2 is still using, causing the job in runner 2 to fail.
Configuration
The relevant config is shown below, but the problem as stated should be simple enough without needing this.
Logs
Work-related so I'd rather not make it available, but it should not be necessary.
The text was updated successfully, but these errors were encountered: