Skip to content

Batch-load environments in EE pipelines

Matthias Käppler requested to merge 321788-fix-environment-nplus1 into master

What does this MR do?

This fixes an N+1 in PipelineSerializer (and possibly elsewhere) for EE clients that use protected environments.

Previously, this would re-load the environment for every build being rendered. We realized that instead we can just make a call to Build#expanded_environment_name, which does not incur a round-trip to the database.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related to #321788

Edited by Matthias Käppler

Merge request reports