[first-time] Check for existing runs when a workspace is locked#122
Open
chrisnellis wants to merge 2 commits intohashicorp:mainfrom
Open
[first-time] Check for existing runs when a workspace is locked#122chrisnellis wants to merge 2 commits intohashicorp:mainfrom
chrisnellis wants to merge 2 commits intohashicorp:mainfrom
Conversation
…before returning an error
mjyocca
reviewed
Sep 12, 2024
Contributor
mjyocca
left a comment
There was a problem hiding this comment.
Apologize for the delay in reviewing your contribution.
I'm not sure that adding this check in this if block will prevent the validation from executing.
The original intention of this validation is to prevent CI workflows from continuously polling a run that will never run in a reasonable time or that the workspace was intentionally locked.
We could consider altering this behavior but would like to know a little more about your specific use case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
As multiple integrations attempt to trigger runs on a workspace, it can happen that one integration triggers a run on a workspace while it is locked and applying an existing run.
In the current logic, when a new run is attempted as the workspace has an existing run, it fails out with an error stating that the workspace is locked.
In desired behavior, if a workspace is locked due to an existing/pending run, it should queue the the run.
Testing plan
External links
Fixes #121