Skip to content

perf(ci): cancel superseded CodeQL runs and idle triggers #4651

Closed

Description

@dan-petty

Problem or Motivation

codeql.yml has no concurrency group and no timeout-minutes, so the default of 360 min applies. 0 of 100 CodeQL runs were cancelled, but a newer push superseded about 30% of the pushes (measured).

Fail-to-Pass runs again on edited, and 22 of 100 runs repeat a head SHA (measured).

cleanup-devcontainer.yml runs on each PR close to delete pr-* tags, but no workflow makes such tags now (#1858 records the same fact). It ran 54 times by 13:00Z on 2026-11-11.

Saving: About 2 jobs and 2 runner-min per superseded push, about 22% fewer Fail-to-Pass runs, and 54-76 fewer cleanup jobs per day.

Found by the CI and test audit of 2026-11-11. The account runs at most 20 hosted jobs at one time (measured), so each job that does no work makes the queue of each pull request longer.

Proposed Solution & Architectural Design

  • codeql.yml: add a concurrency group per ref with cancel-in-progress: ${{ github.event_name == 'pull_request' }}, and set timeout-minutes: 15 (the job maximum is 200 s).
  • fail-to-pass.yml: skip the job on edited when github.event.changes.title is absent.
  • cleanup-devcontainer.yml: remove the pull_request closed trigger. Keep the schedule and workflow_dispatch.
  • Do not change the required Semantic PR title check or the code scanning rule.

Risk: Low.

Target Subsystem

SDLC, Git & PR Governance (.github/workflows/codeql.yml, .github/workflows/fail-to-pass.yml, .github/workflows/cleanup-devcontainer.yml).

Existing Tool Considered

GitHub Actions concurrency, timeout-minutes and event filters (native). No new tool. Cost: about 15,000 tokens and 1 hour.

Acceptance Criteria

  • A new push cancels the CodeQL PR run of the old head.
  • The code scanning rule still gets the CodeQL result of each PR head.
  • The CodeQL analyze job has a timeout.
  • An edit of the body only starts no Fail-to-Pass job.
  • A PR close starts no cleanup run.

Dependencies

None. Related: #1858.

Activity

  1. added
    source/agent
    type/infra
    scope/ci
    status/new
    value/medium
    effort/low
    on Nov 11, 2026
  2. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/infra. The perf prefix of the title gives the type.
    • Scope: scope/ci. The (ci) scope of the title gives the scope.
    • Priority: P2-Medium. Saves runner-minutes and shortens PR queue time but does not block delivery or expose a defect.
    • Value: Medium. Reduces wasted jobs by roughly 22 percent and frees the 20-job concurrency slot for real work on every PR.
    • Effort: Low. Three small YAML edits (concurrency key, timeout key, event filter removal) with no code change.
    • Related: perf(ci): run only the required checks on the release PR #4637, which asks for a different change. Both reduce wasted CI runner-minutes, but #4637 changes release-PR path filters while this candidate adds concurrency, timeout, and removes idle triggers on three other workflows.
  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 11, 2026
  4. removed
    status/in-progress
    owner/agent
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-11 19:36 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/cisource/agenttype/infravalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions