Skip to content

Reduce wait time for test job to run as soon as their needed build job is finished - #11470

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
codex/tune-gitlab-test-needs
May 28, 2026
Merged

Reduce wait time for test job to run as soon as their needed build job is finished#11470
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
codex/tune-gitlab-test-needs

Conversation

@bric3

@bric3bric3 commented May 27, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Narrows selected GitLab tests-stage jobs from needs: [ build_tests ] to needs:parallel:matrix entries that point at the matching build_tests matrix row.

This covers the base, profiling, instrumentation, latest-dependencyinstrumentation, smoke, and muzzle jobs that have a build matrix counterpart. Jobs without a direct counterpart keep the inherited default dependency behavior.

Screenshot 2026-05-27 at 17 32 24Screenshot 2026-05-27 at 17 34 36

Motivation

Test jobs were only started when all tests have been built. Allowing to run test jobs sooner reduces the feedback loop.

Technically a needs entry that references a parallel matrix job waits for every generated job in that matrix by default.

Using needs:parallel:matrix lets each mapped test job wait only for the build row it actually needs.

Relevant GitLab docs:

Additional Notes

Later, we'll run on GitLab 18.6 or later, matrix expressions could reduce the static repetition here in a future cleanup. In particular, $[[ matrix.IDENTIFIER ]] can express 1:1 dependencies between parallel matrix jobs at pipeline creation time, if the downstream job matrix carries the same selector identifiers.

Docs: https://docs.gitlab.com/ci/yaml/matrix_expressions/

@bric3bric3 added comp: tooling Build & Tooling type: feature Enhancements and improvements tag: no release notes Changes to exclude from release notes tag: ai generated Largely based on code generated by an AI or LLM labels May 27, 2026 — with ChatGPT Codex Connector
@bric3
bric3 marked this pull request as ready for review May 27, 2026 15:40
@bric3
bric3 requested a review from a team as a code ownerMay 27, 2026 15:40
@bric3
bric3 requested review from AlexeyKuznetsov-DD and removed request for a teamMay 27, 2026 15:40
@bric3bric3 changed the title Limit GitLab test build dependenciesReduce wait time for test job to run as soon as their needed build job is finishedMay 27, 2026
@dd-octo-sts

dd-octo-stsBot commented May 27, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

SuiteStatus
Startup🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results

Startup Time

ScenarioThis PRmasterChange
insecure-bank / iast13,927 ms13,924 ms+0.0%
insecure-bank / tracing12,823 ms12,954 ms-1.0%
petclinic / appsec16,725 ms16,557 ms+1.0%
petclinic / iast16,677 ms16,740 ms-0.4%
petclinic / profiling16,511 ms16,433 ms+0.5%
petclinic / tracing15,949 ms15,909 ms+0.3%

Commit:b3c47632 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@AlexeyKuznetsov-DDAlexeyKuznetsov-DD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!
Maybe worth to add some comments explaining that feature?
left minor comments about unused anchors...

Comment thread.gitlab-ci.yml Outdated
Comment thread.gitlab-ci.yml Outdated
Comment thread.gitlab-ci.yml Outdated
@bric3

Copy link
Copy Markdown
ContributorAuthor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351Bot commented May 28, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-05-28 08:41:00 UTC ℹ️ Start processing command /merge


2026-05-28 08:41:12 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-05-28 09:03:17 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-05-28 10:18:48 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854dBot merged commit d140367 into masterMay 28, 2026
569 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854dBot deleted the codex/tune-gitlab-test-needs branch May 28, 2026 10:18
@github-actionsgithub-actionsBot added this to the 1.63.0 milestone May 28, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: toolingBuild & Toolingtag: ai generatedLargely based on code generated by an AI or LLMtag: no release notesChanges to exclude from release notestype: featureEnhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@bric3@AlexeyKuznetsov-DD