Resolve "ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_ci_builds_meta..."
What does this MR do?
Resolves the problem, when concurrent requests for a CI/CD job end with a ActiveRecord::RecordNotUnique
. Additionally it adds one frontend fix and simplifies used presenter for CI::BuildMetadata
.
In other words it fixes a regression introduced with !17221 (merged).
Are there points in the code the reviewer needs to double check?
Since this is a fix for a change, that was not released yet, I think it doesn't need a CHANGELOG entry.
Why was this MR needed?
Please read #44922 (closed) for a context.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #44922 (closed)
Edited by Tomasz Maczukin