Skip to content

Bulk insert tags when creating CI pipelines

Marius Bobin requested to merge ci-bulk-insert-tags-for-pipeline-creation into master

What does this MR do and why?

Related to #322386 (closed)

We're generating a lot of queries for each build to persist its tags. This tries to bulk insert all of them.

Screenshots or screen recordings

Before

image

Note: This can be a lot worse because we allow up to 50 tags for each job and tags and taggings are inserted 1 by 1:

After

image

there are no tags related queries between persisting the builds and there are only 2 queries at the end of the transaction to load the tags from all the builds and one to insert the taggings relationship.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Marius Bobin

Merge request reports