Skip to content

Removing Ci::LegacyStage

Problem to solve

The starting point of this issue: #218536 (comment 387394549)

We need to remove Ci::LegacyStage and use Ci::Stage for replacement.

Proposal

When replacing Ci::LegacyStage with Ci::Stage there are a few places to consider:

  • removing Ci::Pipeline#legacy_stages
    • replacing legacy_stages in templates
  • latest_statuses_ordered_by_stage (consider import_export/all_models.yml)
  • removing Ci::Pipeline#legacy_stage
    • replacing legacy_stages in Projects::PipelinesController

Additional notes from comment:

  • When we remove Ci::LegacyStage we should evaluate whether it's possible to remove StageUpdateWorker and Ci::EnsureStageService. This would be an additional step towards deprecating stage related columns of ci_builds table.
    * Before we remove Ci::LegacyStage we should make Ci::Stage presentable so we can replace pipeline.legacy_stages in the view with pipeline.stages. Perhaps we need to make this behind a feature flag an in separate MR prior to actually removing Ci::LegacyStage <- Ci::Stage is already presentable: https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/presenters/ci/stage_presenter.rb

Further details

Availability & Testing

  • Unit test changes - Required unit tests to be updated according to changes
  • Integration test changes - not required
  • End-to-end test change - not required
  • package-and-qa should be run in MR with these changes to ensure no regressions is introduced.
Edited by Laura Montemayor