Skip to content

Build: skip duplicated commands #10573

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

Merged
merged 5 commits into from
Aug 1, 2023
Merged

Conversation

humitos
Copy link
Member

@humitos humitos commented Jul 26, 2023

Sometimes it happens the web servers are congested and the builder retries the API call to save the command in the database. However, one of the first attempts finally ended up working resulting in the command being saved twice.

This small chunk of code checks for the existence of the command before saving it into the database and logs a warning and return 204 if it already exists, instead of re-saving it again.

It's not a perfect solution, but it could help under similar circumstances.

Closes #10567

Sometimes it happens the web servers are congested and the builder retries the
API call to save the command in the database. However, one of the first attempts
finally ended up working resulting in the command being saved twice.

This small chunk of code checks for the existence of the command before saving
it into the database and logs a warning and return 204 if it already exists,
instead of re-saving it again.

It's not a perfect solution, but it could help under similar circumstances.

Related #10567
@humitos humitos requested a review from a team as a code owner July 26, 2023 11:43
@humitos humitos requested a review from stsewd July 26, 2023 11:43
Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have a test for this

@humitos humitos requested a review from stsewd July 31, 2023 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build marked as "Failed" when "exit 183" ("skip the build") is used
2 participants