Apply E2E test selection to Caproni shadow jobs
What does this MR do?
Makes the Caproni shadow jobs in test-on-cng follow E2E test selection, the same way the jobs they shadow do. Today they always run their full scenario, and because e2e:test-on-cng uses strategy: depend, tier 2 MR pipelines wait for them. In pipelines with a selected spec list, Caproni finished 3.6–18 minutes after the required jobs and used about 10× the runner time.
- Remove the
QA_TESTS: ""override from.caproni-test, so the jobs use theQA_TESTSthatPipelineCreatorwrites. - Add each Caproni job to its scenario's
pipeline_mappings, next to its twin. The exception iscng-oauth-caproni. Its only spec hasonly: { job: /cng-oauth-caproni/ }, which the selection dry run reports as pending, so mapping it would set the job toneveron every run. It keepsQA_TESTS: ""and runs its full scenario as before. - Move the five Caproni job definitions from
caproni.gitlab-ci.ymlintotest-on-cng/main.gitlab-ci.yml, which is the only filePipelineCreatoredits. This is the same approach ascng-instance-ff-inverse. The shared.caproni-*templates stay incaproni.gitlab-ci.yml.
cng-instance-ff-inverse also extends .caproni-test, but it only runs when feature flags change, and then ci.rake runs the full suite, so dropping the override doesn't change it.
Local check
I ran PipelineCreator#create([:test_on_cng]) with one selected spec and stubbed scenario runtimes (All 600s, OAuth 30s, others 0). In the generated test-on-cng-pipeline.yml:
cng-instance-caproniwent fromparallel: 10toparallel: 1, matchingcng-instance.cng-relative-url-caproni,cng-registry-caproni, andcng-secrets-manager-capronigotrules: - when: never.QA_TESTSis set at the top level, and onlycng-oauth-capronioverrides it.
Tested with a stacked MR that selected one spec (!262060 (closed)): cng-instance-caproni ran as one job on that spec only (10m18s, next to 10m27s for cng-instance), and the other Caproni jobs were set to never. Details are in the results comment.
Related issues
- #633727 (closed)
- Blocks #623851
References
Checklist
Pre-merge
Consider the effect of the changes in this merge request on the following:
- Different pipeline types: only the
test-on-cngchild pipeline changes. Full-suite runs (master, framework changes,pipeline:run-all-e2e) still run every Caproni job. - Non-canonical projects:
-
gitlab-foss: no change, same child pipeline config -
security: no change -
dev: no change - personal forks: no change
-
- Pipeline performance: fewer and shorter Caproni jobs in MR pipelines with a selected spec list
If new jobs are added:
No new jobs are added; existing jobs are moved.
- Change-related rules (e.g. frontend/backend/database file changes): N/A
- Frequency they are running (MRs, main branch, nightly, bi-hourly): N/A
- Add a duration chart: N/A
Post-merge
- Consider communicating these changes to the broader team following the communication guideline for pipeline changes