Skip to content

ci: upload flaky-run Playwright traces and run check:links on a schedule - #1196

Merged
mrbobbytables merged 1 commit into
cncf:mainfrom
mrbobbytables:ci/flaky-traces-and-check-links
Oct 8, 2026
Merged

mrbobbytables merged 1 commit into
cncf:mainfrom
mrbobbytables:ci/flaky-traces-and-check-links

Conversation

@mrbobbytables

Copy link
Copy Markdown
Member

CI Fix

Closes #1188 (consolidation of #1179 and #1137).

Flaky-run traces (#1179)

playwright.config.js sets retries: 1 and trace: 'retain-on-failure', so a flaky spec's first failing attempt leaves a trace in test-results/ — but the job exits 0 after the retry passes, and the upload step's if: failure() never fires. Every flaky run's evidence was discarded; PR #1165's e2e flake earlier this week is a live example of a trace nobody could retrieve.

The upload step now runs under if: ${{ !cancelled() }} with if-no-files-found: ignore:

  • flaky-but-green jobs upload the failing attempt's trace
  • fully green runs produce no artifact and no warning
  • genuinely failed runs behave exactly as before

check:links never ran (#1137)

check:links was defined in package.json, configured by .markdown-link-check.json, guarded by tests/markdown-link-check-config.test.mjs, and invoked by no workflow — recorded as a deliberate exemption in GATES_NOT_RUN_BY_CI because it resolves outbound URLs against the live internet.

New .github/workflows/check-links.yml runs it weekly (Mondays 04:23 UTC) and on workflow_dispatch, keeping the network out of per-PR gates while stopping link rot from accumulating unnoticed. Follows the repo's workflow contracts: SHA-pinned actions, persist-credentials: false, contents: read, timeout, concurrency group, NODE_VERSION: '22' (the Node-parity test reads it).

Accordingly, check:links leaves GATES_NOT_RUN_BY_CI (the suite's "no recorded CI exemption names a gate a workflow already runs" test enforces this), and the exemption cross-reference comment in issue-template-contract.test.mjs now points at the workflow.

Validation

  • npm run test:unit — 2072 passed, 0 failed (workflow-contract suites cover the new workflow)
  • npm run test:unit:coverage:check — passes
  • npx prettier --check on all four touched files — clean

Two workflow gaps consolidated in cncf#1188:

Flaky traces (cncf#1179): playwright.config.js sets retries: 1, so a flaky
spec fails, retries, passes, and the job exits 0. The trace upload step
was gated on if: failure(), so the retained trace of the first failing
attempt was discarded on every flaky run - CI kept no evidence of its
own flakes. The step now runs under !cancelled() with
if-no-files-found: ignore, so flake traces upload on green jobs and
fully green runs stay quiet.

check:links (cncf#1137): the gate was defined in package.json, configured by
.markdown-link-check.json, guarded by tests, and run by no workflow. A
new weekly check-links.yml runs it on a schedule and on demand; it stays
out of the per-PR gates because it resolves outbound URLs against the
live internet, where a third-party outage would fail unrelated PRs. The
check:links entry leaves GATES_NOT_RUN_BY_CI, and the exemption
cross-reference in issue-template-contract.test.mjs now points at the
workflow instead.

Closes cncf#1188

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
@mrbobbytables
mrbobbytables added this pull request to the merge queue Oct 8, 2026
Merged via the queue into cncf:main with commit 518089f Oct 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI workflow gaps: flaky-run traces are never uploaded and check:links never runs (needs human: workflow edits)

1 participant