Skip to content

CI: cancel obsolete PR runs and remove redundant setup and builds #2289

Closed

Description

@edelauna

CI: cancel obsolete PR runs and remove redundant setup and builds

Problem and evidence

Ordinary PR updates repeat avoidable work and retain obsolete validation runs. Reducing this work saves runner occupancy whether or not runner contention explains the observed start delays.

Investigation found:

  • Translation checks install the workspace although scripts/find-missing-translations.js uses Node built-ins; setup took a median 23s in the exploratory sample.
  • test:ci, test:ci:mock and themes:build in apps/vscode-e2e/package.json run a webview build after the workspace bundle graph already requests it through src/turbo.json. Verify the current graph before removal.
  • Mocked E2E trace showed a second Vite build taking approximately 21s.
  • At investigation time Code QA, mocked E2E and CodeQL lacked workflow-level superseded-PR cancellation; the Code QA unit group included the SHA, preventing cancellation across commits. Recheck current workflows before editing.

Implementation

Use independently reversible commits:

  1. Add PR-scoped cancellation to appropriate validation workflows. Include workflow identity and PR identity in groups; preserve intentional main, release, manual and merge-queue behavior.
  2. Keep pinned Node setup for translations; remove dependency installation if a clean execution confirms it is unnecessary.
  3. Verify a clean Turbo bundle graph produces all required assets, then remove confirmed duplicate builds while preserving direct/local script contracts.

Acceptance criteria

  • A second push cancels obsolete validation for that PR only; other PRs/workflows and release/merge-queue work are unaffected.
  • Translation checks work without installed workspace dependencies and still detect missing translations.
  • Clean builds produce assets required by mocked E2E and theme/visual consumers; affected checks pass.
  • Required check names, test inventory, coverage and cache correctness are preserved.
  • Record execution and aggregate runner-minute savings separately from required-check completion time; queue reduction is a hypothesis, not a prerequisite.

Related: #2044 tracks real-network mocked E2E stalls; this issue does not replace it.

Sources: GitHub concurrency, Turbo task dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions