Skip to content

Cleanup expanded_environment_name usage

Context

!202162 (comment 2742309853)

Problem

With the introduction of Environments::Job model we now have a better association to fetch the persisted environment.

We should reduce to the minimum (or remove) the usage of expanded_environment_name and to use the persisted environment, instead of comparing environments by name.

Even the definition of Ci::Deployable#persisted_environment should use job.job_environment.environment instead of a lookup by name.

Related issues

Edited by Fabio Pitino