Skip to content

Make Ci::Seed to be anti-corruption layer

Kamil Trzciński requested to merge refactor-pipeline-seeds into master

What does this MR do?

This provides an anti-corruption layer (a single place) which transforms job definition into build model attributes, moving this out of Ci::YamlProcessor.

As side effect it removes a bunch of Ci::YamlProcessor business logic, leaving this class with shallow legacy validations.

The logic removed from Ci::YamlProcessor is moved into

  1. into ci/config/job when composing job object: it resolves global/job variables by merging them,
  2. into ci/seed/build: it transforms bare job definition into build attributes.

Why this is done?

  1. Well, Ci::Seed::Stage/Build are responsible to converting attributes into resource, this makes it clear, by providing the simple sanitization and data normalization,
  2. Ci::YamlProcessor is legacy and fit for very specific purpose, this makes it even thinner and subject to be removed.

What are the relevant issue numbers?

Related to https://gitlab.com/gitlab-org/gitlab-ee/issues/5426. We work on generalizing configuration handling to provide web ide specific config.

Does this MR meet the acceptance criteria?

Merge request reports