Skip to content

Actions Fleet Monitor has crashed on every run since 2026-09-21: legacy_attr_file is used before it is assigned #2279

Closed as not planned

Description

@don-petry

Problem

The daily "Actions Fleet Monitor" workflow (actions-fleet-monitor.yml) has ended in failure on every scheduled run since 2026-09-21. Its last successful run was 2026-09-20 11:36 UTC. No fleet monitor report has been produced for three weeks.

From run 38141887715 (2026-10-11 13:06 UTC):

  petry-projects/.github
scripts/fleet_monitor.sh: line 221: legacy_attr_file: unbound variable
jq: error: writing output failed: Broken pipe
##[error]Process completed with exit code 1.

Cause

scripts/fleet_monitor.sh runs under set -euo pipefail. legacy_attr_file is appended to at line 221, inside the first per-repository loop (lines 177 to 308), but it is only assigned at line 553 (legacy_attr_file=$(mktemp)). The first repository that has a non-ingress workflow with runs aborts the script. Introduced by commit a1ccf3b ("Retarget run attribution to job/role level", #1789), merged 2026-09-20, which matches the first failing day.

No test runs the script far enough to reach line 221, so CI stayed green.

Why it matters now

Scope

  1. Create legacy_attr_file before the loop that appends to it; check every other temp-file variable in the script for the same ordering fault.
  2. A regression test that runs the script end to end against a stubbed gh with at least one non-ingress workflow that has completed runs, and fails on an unbound variable.

Acceptance criteria

  1. The next scheduled run of "Actions Fleet Monitor" after the fix ends in success and posts its report.
  2. The regression test fails when the late assignment is restored.
  3. A follow-up is filed (or a decision recorded here) on why a daily monitor could fail for three weeks without an alert.

Activity

  1. github-actions commented on Oct 11, 2026

    @github-actions
    Contributor

    Thank you for the thorough report, including the failing run, the exact line numbers and the commit that introduced the regression. This is very helpful. One question to confirm the scope of the fix: besides legacy_attr_file, have you seen any other temp-file or variable in scripts/fleet_monitor.sh that is used before it is assigned, or is that the only one you found so far?

  2. don-petry commented on Oct 11, 2026

    @don-petry
    CollaboratorAuthor

    Duplicate of "Fleet Monitor aborts every run: legacy_attr_file used before it is created" (#2277), filed 30 minutes earlier, which already has a pull request. My search before filing missed it. Closing this one; the two facts it adds are carried over there.

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

    bugBug reports

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions