Skip to content

Stop the Line counts a failed Dependabot update job, which no re-run can start, as a broken default branch #702

Backlog

Description

@polewskm

Note

Repositories:

  • NCodeGroup/project-template: this issue
  • NCodeGroup/identity: where the gap showed up, and where the fix is checked

Attach or clone each before working on this issue.

Problem

Stop the Line (ADR-0067, as run-feedback, run-issues and run-epic apply it) reads every Actions run on the default branch's newest commit with actions/runs?head_sha=<newest> and treats any completed run whose conclusion isn't success, skipped or neutral as a broken default branch. That list also holds Dependabot's own update jobs, which GitHub runs as event: dynamic runs of dynamic/dependabot/dependabot-updates against the default branch's head. Such a job tests nothing on the branch: it fails when Dependabot can't propose an update, such as security_update_not_possible when no resolvable version fixes an alert. It also can't be retried: POST actions/runs/<id>/rerun-failed-jobs answers HTTP 403 This workflow run cannot be retried, so item 2's re-run never starts and the failure counts as real.

So a repository whose newest default-branch commit has a failed Dependabot update job holds back every merge recommendation, under merge: person too, even though CI, the release, the publications and the deployments on that commit all passed. The line stays stopped until a later commit lands with no failed Dependabot job on it, and a Dependabot job that keeps failing on each new head (the same unfixable alert) keeps it stopped.

Seen in

NCodeGroup/identity#988 (template update to v0.156.0): main's newest commit b4268070b57d16d2dd468971465277244835429d has every CI, release, image, chart and CodeQL run green, and one failed run, https://github.com/NCodeGroup/identity/actions/runs/46586463813 (npm_and_yarn in /frontend for cross-spawn - Update #1742793341, actor dependabot[bot], event dynamic, error security_update_not_possible: latest resolvable cross-spawn 7.0.6, lowest non-vulnerable 7.1.0). The re-run answered HTTP 403, so the run held back the pull request's merge recommendation.

Proposed fix

Leave out of the Stop the Line run list every run whose event is dynamic (or, more narrowly, whose path starts with dynamic/dependabot/), in run-feedback, run-issues, run-issues-all-in, run-epic and .template/Test-MergeGate.ps1 -Landing where it reads the same list, and say in ADR-0067 that a run that doesn't build, release, publish or deploy the commit, such as a Dependabot update job, doesn't break the line. A failed Dependabot security update is still worth surfacing, but as a finding of its own (an alert that needs a manual fix), not as a stopped line.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions