Store latest in database for CI builds
What does this MR do?
This stores latest in the database. We update in transaction information about whether the build is latest. We don't need an index on that column, as we aim for 99% builds to be latest (retry is usually an exception).
This greatly simplifies and fastens a lot of SQL queries and job-stage-related views.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together