SRE-4019 ci: make downstream testing build-only and fix axis list - #534
Conversation
The DAOS Build and Test matrix triggers a full downstream DAOS pipeline per axis, including functional and hardware stages. Over the last 9 master builds the axis pass rate was 11/36 (31%) and axis durations ranged from 4 minutes to 14,094 minutes, while every other stage in the job totals ~4 minutes. That cost re-tests DAOS rather than this library. Invert the existing machinery so a build-only downstream run is the default and a full run is opt-in via 'Full-downstream-test: true'. Emit both 'Skip-test: true' and 'Skip-test-hardware: true': on daos master and release/2.8 the hardware stages are gated by their own parent pragma, so 'Skip-test' alone leaves them running. With the per-axis cost bounded, cover release/2.8 and weekly-2.8-testing, which previously had no coverage at all, and drop weekly-2.6-testing, whose Jenkinsfile is structurally the same as the other weekly branches. release/2.6 keeps its axis because it is the only branch still driven by this library's own skipStage(). Signed-off-by: Ryon Jensen <ryon.jensen@hpe.com>
A pipeline-lib PR job loads pipeline-lib@master, so a change to vars/ does not affect the PR's own downstream matrix. Point the @Library line at this branch so the build-only downstream change can be proven before it lands. REVERT THIS COMMIT BEFORE MERGING. Signed-off-by: Ryon Jensen <ryon.jensen@hpe.com>
The first downstream run proved 'Skip-test: true' does not cover the 'Fault injection testing' stage on release/2.6: skipStage() gates that stage on 'skip-fault-injection-test' and 'skip-func-test' only, so it still ran for 19.7 minutes. Emit 'Skip-fault-injection-test: true' as well; daos master and release/2.8 already recognise the same pragma. Signed-off-by: Ryon Jensen <ryon.jensen@hpe.com>
Reverts f995976. That commit pointed this repo's @Library line at the PR branch so that the downstream matrix would actually exercise the new buildDaosJob pragma logic (a pipeline-lib PR otherwise loads pipeline-lib@master and therefore tests master's vars/, not the PR's). Verification is complete, so restore the commented-out form. Skip-daos-build-and-test: true (this commit's matrix would run under master's buildDaosJob, i.e. the old full-test behaviour, so it is skipped) Signed-off-by: Ryon Jensen <ryon.jensen@hpe.com>
Ready to land, and best landed before #533This PR is ready to merge as it stands. Verification is complete and recorded in the PR body: all five axes were exercised with this branch's Why the matrix shows SequencingThis is worth landing ahead of #533 (SRE-4015). The two PRs touch no files in common, so the order is free to choose — but #533 still needs a green build to land, and until this change is on master that build runs the full four-axis matrix at hours-to-days cost. With this merged first, #533's verification becomes build-only at roughly 77 minutes worst case while still exercising the library. CI is currently overloaded, which is the reason for caring about the order at all. /cc SRE-4019 |
Now that downstream runs are build-only, the weekly axes complete in under a minute each, so the marginal cost of keeping weekly-2.6-testing is effectively nil and it is not worth dropping for de-duplication. Axis list is now master, release/2.6, release/2.8, weekly-testing, weekly-2.6-testing and weekly-2.8-testing. Skip-daos-build-and-test: true (the @Library line is commented out again, so this commit's matrix would run under master's buildDaosJob, i.e. the old full-test behaviour) Signed-off-by: Ryon Jensen <ryon.jensen@hpe.com>
Note
The red
release/2.6axis is not caused by this PR.Build RPM on Leap 15.5fails in%buildwithChecking for C library fabric... no/BuildRequired: ofi needs to be built, and it failed identically on build 1 of this PR — before any of this branch's library code was loaded. It is a broken Leap 15.5 mock environment for 2.6 and needs its own ticket.NLT on EL 8.8is UNSTABLE for the same pre-existing reason. Details under Pre-existing failures surfaced below.Problem
The
DAOS Build and Testmatrix creates a real branch indaos-stack/daosper axis with the@Libraryline pointed at the PR, then triggers the full DAOS pipeline against it — functional, fault injection and hardware stages included.Measured over the last 9 pipeline-lib master builds:
Test LibraryTest Libraryaxis durationTwo defects:
release/2.8andweekly-2.8-testinggot zero coverage, whilerelease/2.6consumed two of the four axes and most of the elapsed time.Changes
vars/buildDaosJob.groovy— the machinery existed but was inverted: a full test run was the default and skipping was opt-in. Now build-only is the default and a full downstream run is opt-in viaFull-downstream-test: true.Skip-downstream-test: truestill works and takes precedence overFull-downstream-test.The subtlety is that
Skip-test: truedoes not cover everything. A build-only run emits three pragmas:Skip-test: trueTestparent stage: functional and RPM tests on all branchesSkip-test-hardware: truerelease/2.8gate hardware stages on their own parent pragma ingetStageNameSkipPragmas();skip-testis never consulted for themSkip-fault-injection-test: truerelease/2.6the fault injection stage is gated by this library'sskipStage(), which checks onlyskip-fault-injection-test/skip-func-testThe last two were each confirmed empirically, not by reading code alone — see below.
Jenkinsfile— axis list is nowmaster,release/2.6,release/2.8,weekly-testing,weekly-2.6-testing,weekly-2.8-testing.Axis-list decision
release/2.6keeps one axis and loses the second. It is the only remaining branch whose Jenkinsfile is driven by this library's ownskipStage()(27 call sites; the other five branches all use their in-repogetStageNameSkipPragmas()and zeroskipStage()calls). That makes it the highest-value integration target we have, and it is exactly the kind of breakage the mocked JUnit tests cannot catch — it is also the branch that exposed the fault injection gap above.All three weekly branches are kept. An earlier revision of this PR dropped
weekly-2.6-testingon the grounds that it is structurally the same generation of Jenkinsfile asweekly-testingandweekly-2.8-testingand largely duplicated their coverage. That de-duplication is not worth making: once downstream runs are build-only the weekly axes finish in under a minute each, so the marginal cost of keeping all three is effectively nil, and having every weekly branch covered is worth more than saving a minute.Net: 4 axes to 6, with
release/2.8andweekly-2.8-testingnewly covered. Widening only makes sense because the first change bounds the per-axis cost, which is why both are in one commit.How this was verified
A pipeline-lib PR does not self-test
vars/changes: the PR job logsLoading library pipeline-lib@master, because this repo's own@Libraryline is commented out. Only the downstream daos branches get@Library(value='pipeline-lib@<pr-branch>'), and the pragmas are produced upstream bybuildDaosJob. So build 1 of this PR ran entirely on master'sbuildDaosJoband emitted no pragmas at all —Functional Hardware Medium VMDprovisioned five real nodes and ran for 25.6 minutes.To get real evidence, the
@Libraryline was temporarily pointed at this branch (the mechanism documented in the comment above it). That commit is reverted before merge.Downstream results with the change actually loaded:
weekly-2.8-testingweekly-testingweekly-2.6-testingrelease/2.8masterrelease/2.6On
release/2.6,Fault injection testing on EL 8.8andTest Hardwareboth reportNOT_EXECUTED. Before the third pragma was added, fault injection ran for 19.7 min.Downstream commit message confirmed on the created branch:
The remaining time on
master,release/2.8andrelease/2.6is builds and unit tests, which are deliberately kept —unitTest(),provisionNodes()andrunTest()are this library's code and are worth exercising.Pre-existing failures surfaced
The
release/2.6axis is red for reasons unrelated to this change, and was red identically in build 1 before this library was loaded:Build RPM on Leap 15.5fails in%buildwithChecking for C library fabric... no/BuildRequired: ofi needs to be built— a broken Leap 15.5 mock environment for 2.6.NLT on EL 8.8is UNSTABLE.Arguably that is the point: a build-only axis surfaces a broken 2.6 RPM build in about 20 minutes instead of burying it behind a multi-day functional run.
Tests
New
src/test/groovy/testBuildDaosJob.groovycovers the pragma logic: build-only default, the three skip pragmas always emitted together,Full-downstream-testopt-in,Skip-downstream-testprecedence and no-op-on-its-own behaviour,Test-skip-build, and that the joined pragma block has no stray blank lines (the old string concatenation could emit a leading newline).The temporary
@Librarycommit has now been reverted, so the@Libraryline is commented out again as it should be on master. Because that revert means this PR's own final CI run falls back to master'sbuildDaosJob— i.e. the old full-test behaviour this PR is removing — the revert commit carriesSkip-daos-build-and-test: true.Out of scope
Moving a full downstream run to a nightly/weekly trigger on pipeline-lib master — deferred to a separate ticket.