Make Ci::Seed to be anti-corruption layer
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
- into ci/config/job when composing job object: it resolves global/job variables by merging them,
- into ci/seed/build: it transforms bare job definition into build attributes.
Why this is done?
- Well,
Ci::Seed::Stage/Build
are responsible to converting attributes into resource, this makes it clear, by providing the simple sanitization and data normalization, -
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?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer