Skip to content

Resolve "Multiple requests to the post-the-build-status-to-a-commit API endpoint produces duplicate jobs"

What does this MR do and why?

This MR sets the ttl to 1 minute for the CreateCommitStatusService. This is done, because there is a possibility for duplicate pipelines to be created which already happened in #365615.

The reason for that seems to be that during a save process, find_or_create_pipeline is called by an external service (e.g. TeamCity), which creates a pipeline twice since the lock that we use here times out after 5 seconds. Setting the ttl here to 1.minute should solve the problem for the most part since with the current implementation of 5 seconds, out of 20,000 builds, 460 occurrences were created duplicately.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #365615

Edited by Daniel Prause

Merge request reports

Loading