|
8 | 8 | # than that empty diff, because a pull request touching a route and other files, whose author |
9 | 9 | # reverts the route change and keeps the rest, still has a non-empty diff that no longer matches. |
10 | 10 | # The gating moved into the jobs below instead, where it can read whether a comment exists. |
| 11 | + # `labeled` is here so adding the force label posts a report on demand without waiting for a push; |
| 12 | + # the other types are the ordinary route-change path. |
11 | 13 | pull_request: |
12 | | - types: [opened, synchronize, reopened] |
| 14 | + types: [opened, synchronize, reopened, labeled] |
13 | 15 | # The corpus job below is gated to this package's own paths, so a scheduled run is what still |
14 | 16 | # scans the tree as it drifts. Nightly rather than per route pull request: a new route can make a |
15 | 17 | # known laundering shape start paying, but that is a property of the tree accumulating, not of any |
16 | 18 | # one pull request, and it does not need catching within five minutes of the merge. |
17 | 19 | schedule: |
18 | | - - cron: "0 3 * * *" |
| 20 | + # Off the top of the hour on purpose: GitHub delays and drops more scheduled runs at :00 under |
| 21 | + # load, and this nightly is the only tree-drift backstop and has no failure notification. |
| 22 | + - cron: "17 3 * * *" |
19 | 23 | workflow_dispatch: |
20 | 24 |
|
21 | 25 | concurrency: |
|
46 | 50 | # The corpus job's gate. Narrower than the report's on purpose: what the corpus measures is |
47 | 51 | # the tool's resistance to laundering, which only an edit to the tool can weaken. |
48 | 52 | package: ${{ steps.filter.outputs.package }} |
49 | | - # The report job's gate, the union: a route change moves the report as well. |
50 | | - report: ${{ steps.filter.outputs.package == 'true' || steps.filter.outputs.routes == 'true' }} |
| 53 | + # The report job's gate, the union: a route change moves the report as well, and the force label |
| 54 | + # asks for one when nothing did. |
| 55 | + report: ${{ steps.filter.outputs.package == 'true' || steps.filter.outputs.routes == 'true' || contains(github.event.pull_request.labels.*.name, 'observability-map') }} |
| 56 | + # The force label, read once here so the render step posts the full report even at zero delta. |
| 57 | + forced: ${{ contains(github.event.pull_request.labels.*.name, 'observability-map') }} |
51 | 58 | # The id of a marker comment an earlier push left, empty if there is none, and the one source |
52 | 59 | # both the render and upsert steps read it from. |
53 | 60 | comment: ${{ steps.comment.outputs.id }} |
@@ -307,6 +314,7 @@ jobs: |
307 | 314 | env: |
308 | 315 | SCANNED: ${{ needs.changes.outputs.report }} |
309 | 316 | EXISTING_COMMENT: ${{ needs.changes.outputs.comment }} |
| 317 | + FORCED: ${{ needs.changes.outputs.forced }} |
310 | 318 | HEAD_SHA: ${{ github.event.pull_request.head.sha }} |
311 | 319 | COMPARE_URL: ${{ github.server_url }}/${{ github.repository }}/compare/${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} |
312 | 320 | run: | |
@@ -356,6 +364,10 @@ jobs: |
356 | 364 | if [ -n "$EXISTING_COMMENT" ]; then |
357 | 365 | flags=(--existing-comment) |
358 | 366 | fi |
| 367 | + # The force label posts the full report even when nothing moved. |
| 368 | + if [ "$FORCED" = "true" ]; then |
| 369 | + flags+=(--force) |
| 370 | + fi |
359 | 371 |
|
360 | 372 | if ! emit /tmp/head.json "$base" "${flags[@]}"; then |
361 | 373 | echo "render failed; falling back to the stale-report comment" >&2 |
|
0 commit comments