Conversation
The `microbenchmarks-pr-comment` job declares `needs: [microbenchmarks]`, but `microbenchmarks` uses `rules:` with `changes:` filters that exclude it from pipelines where only documentation files change. GitLab rejects the entire pipeline with a 400 error when a needed job doesn't exist. Adding `optional: true` lets GitLab skip the dependency gracefully when the microbenchmarks job is filtered out, instead of failing pipeline creation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Thank you for updating Change log entry section 👏 Visited at: 2026-03-27 17:55:45 UTC |
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: af6f83d | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
BenchmarksBenchmark execution time: 2026-03-27 17:55:01 Comparing candidate commit af6f83d in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 0 unstable metrics.
|
ivoanjo
left a comment
There was a problem hiding this comment.
👍 LGTM thanks for looking into this.
I can confirm I did run into this on a PR last week and thought "hmmm... this is weird". I then tried to manually trigger the gitlab pipeline and that fixed it so I kinda went "hmmm... will keep an eye on it". So you totally beat me to it.
The fix itself seems reasonable, although like with many of these CI changes, you kinda look at it, shrug, and say, worst thing it doesn't work and we need to change it again. Kinda annoying to validate and all that ;)
|
I decided to go ahead and merge this since broken CI is really annoying, hope that's ok ;) |
What does this PR do?
Adds
optional: trueto themicrobenchmarks-pr-commentjob'sneedsdependency onmicrobenchmarksin.gitlab/benchmarks.yml.Motivation:
#5488 added
changes:rules to themicrobenchmarksjob so it's skipped on PRs that don't touch relevant files — but didn't updatemicrobenchmarks-pr-comment, which hasneeds: [microbenchmarks]. Whenmicrobenchmarksis filtered out, GitLab rejects the entire pipeline because a needed job doesn't exist.This breaks any PR where GitLab's
changes:evaluation excludesmicrobenchmarks— not just docs-only PRs. Both of these PRs are currently stuck with the identical Mosaic error:AGENTS.md). Expected to be excluded bychanges:.ext/,lib/,spec/, yetmicrobenchmarksis still excluded. GitLab'schanges:evaluation can exclude jobs even when matching paths are present (e.g. when the diff base is ambiguous or the branch diverged significantly). This means theneeds:withoutoptional: trueis a broader failure than just docs-only PRs.Both show the same Mosaic pipeline creation error:
The causal chain:
microbenchmarkshasrules:withchanges:filters (added in ci: skip microbenchmarks on PRs that don't touch relevant files #5488).changes:and excludesmicrobenchmarksfrom the pipeline.microbenchmarks-pr-commentdeclaresneeds: [microbenchmarks]withoutoptional: true.dd-gitlab/finishedis never posted → required check stays pending → PR is blocked.The fix:
When
microbenchmarksis filtered out,microbenchmarks-pr-commentis simply skipped (when: on_successwith no upstream dependency to satisfy). Whenmicrobenchmarksdoes run, behavior is unchanged.Change log entry
None.
Additional Notes:
Introduced by #5488 (merged 2026-03-23). Confirmed that docs-only PRs merged before that date (#5491, #5485) had
dd-gitlab/finished: successwith no issues.How to test the change?
Once merged, re-trigger CI on #5515 and #5111 (e.g. push an empty commit). The GitLab pipeline should create successfully and
dd-gitlab/finishedshould resolve.