Commit cb90e62
Replace paths: filter with content-hash gate in resolve-build-deps.yaml (DataDog#23458)
* Replace paths: filter with content-hash gate in resolve-build-deps.yaml
The workflow was over-triggering on merge commits whose push diffs swept in
already-landed .builders/ changes unrelated to the PR. Replace the paths:
filter with a content-hash gate backed by .builders/inputs_hash.py.
- inputs_hash.py: replace COMMON_INPUTS (literal paths) with SHARED_INPUTS
and RESOLUTION_INPUTS (glob patterns); add compute_target, pinned_target,
compute_resolution, pinned_resolution, verify_resolution, status; replace
old compute/pinned CLI subcommands with status and verify-resolution.
- upload.py: import inputs_hash, extend _write_builder_inputs to accept a
resolution hash, emit [resolution] + [images] TOML sections, pass
compute_resolution() at the call site.
- resolve-build-deps.yaml: drop paths: filter; add gate job that runs
inputs_hash.py status; add if: needs_resolution == 'true' to test job;
read rebuild_<target> flags from gate outputs in build job.
- verify-deps-pin.yaml: new workflow that runs inputs_hash.py verify-resolution
on gh-readonly-queue/** pushes to block merges with a stale resolution pin.
- tests/test_inputs_hash.py: new test file covering _hash_paths stability,
compute/pinned/verify for targets and resolution, status fresh/stale cases,
CLI output shape, and a coverage test that fails CI if a new .builders/ file
is not classified.
NOTE: verify-deps-pin must be added to required status checks on master and
release branches before this fully closes the concurrent-PR race window.
* review feedback
* Update dependency resolution
* tests and introduce gate runs for master and release branches.
* Update dependency resolution
* implement clear feedback
* Overhaul hashing in response to reviews; stop writing metadata.json
* fix type hint
* Update dependency resolution
* Update dependency resolution
* more feedback
* Update dependency resolution
---------
Co-authored-by: dd-agent-integrations-bot[bot] <dd-agent-integrations-bot[bot]@users.noreply.github.com>1 parent d509d38 commit cb90e62
14 files changed
Lines changed: 1111 additions & 280 deletions
File tree
- .builders
- tests
- .deps
- resolved
- .github/workflows
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
466 | 468 | | |
467 | 469 | | |
468 | 470 | | |
469 | | - | |
| 471 | + | |
470 | 472 | | |
471 | 473 | | |
472 | 474 | | |
| |||
496 | 498 | | |
497 | 499 | | |
498 | 500 | | |
499 | | - | |
| 501 | + | |
500 | 502 | | |
501 | 503 | | |
502 | 504 | | |
| |||
516 | 518 | | |
517 | 519 | | |
518 | 520 | | |
519 | | - | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
520 | 563 | | |
521 | 564 | | |
522 | 565 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | | - | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
274 | 275 | | |
275 | 276 | | |
276 | 277 | | |
277 | | - | |
| 278 | + | |
278 | 279 | | |
279 | 280 | | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | 281 | | |
290 | 282 | | |
291 | 283 | | |
| |||
311 | 303 | | |
312 | 304 | | |
313 | 305 | | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
339 | 310 | | |
340 | 311 | | |
341 | 312 | | |
| |||
384 | 355 | | |
385 | 356 | | |
386 | 357 | | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
387 | 366 | | |
388 | 367 | | |
389 | | - | |
| 368 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
0 commit comments