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.
When you make a request to create an execution, and the runtime doesn't exist yet, the executor tries to create the runtime first. If the runtime is already being created by another request (and exists in the
activeRuntimes
table with a 'pending' status), the /v1/runtimes endpoint returns a 409 Conflict error with the message:In the execution creation code, specifically in the loop that attempts to create the runtime, any HTTP response with a status code between 400 and 499 (inclusive) is treated as a fatal error, and it immediately throws an exception instead of retrying. This means that when the executor receives a 409 status code, it doesn't retry and instead exits the loop, leading to this error on sentry.
This PR excludes
409
responses from the check to avoid throwing an immediate exception.