-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix cross-repo race condition #4404
Conversation
This should be reverted after the corresponding branch on DataDog/vaccine is merged.
This narrows down the triggered workflow run to the exact one created by the GitLab CI pipeline. A number of corner cases were improperly handled, and there was an opportunity for a secret leak, which led to a full script rewrite.
BenchmarksBenchmark execution time: 2025-02-19 10:15:39 Comparing candidate commit ca2935b in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 33 metrics, 2 unstable metrics. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4404 +/- ##
=======================================
Coverage 97.70% 97.70%
=======================================
Files 1366 1366
Lines 83372 83373 +1
Branches 4230 4230
=======================================
+ Hits 81462 81463 +1
Misses 1910 1910 ☔ View full report in Codecov by Sentry. |
Datadog ReportBranch report: ✅ 0 Failed, 20596 Passed, 1372 Skipped, 3m 18.5s Total Time |
This reverts commit e216ea9.
What does this PR do?
Motivation:
Given that we run across repos and across CIs, there was a significant probability to pick incorrect workflows, that would be entirely unrelated to the
dd-trace-rb
item that triggered a workflow here.On the
vaccine
side this is addressed by:trigger-id
inputtrigger-id
in the workflow run nameAs a bonus this allows direct identification of
vaccine
workflow runs straight from GitHub Actions UI.The image is pulled by
vaccine
by tag containing only the commit SHA and so remains vulnerable to race conditions.Change log entry
None.
Additional Notes:
Use lloeki/fix-cross-repo-race-condition branch temporarily must be reverted once that sister PR is merged on
DataDog/vaccine
.shellcheck
ed locally, but this linting should probably be enforced in CI.How to test the change?
CI should pick the proper things throughout. Check
Vaccine
job logs in GitLab pipeline, e.g https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-rb/-/jobs/813418074 and https://github.com/DataDog/vaccine/actions/runs/13409446292