Skip to content

Fail report_failed_workflows job on hidden reporting pipeline errors#3552

Merged
plengauer merged 3 commits into
mainfrom
copilot/hidden-failure-in-workflow
Jun 2, 2026
Merged

Fail report_failed_workflows job on hidden reporting pipeline errors#3552
plengauer merged 3 commits into
mainfrom
copilot/hidden-failure-in-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 1, 2026

The scheduled Report Failed Workflows job could complete successfully while still masking failures in the reporting pipeline. This update makes the step fail fast on real command/pipeline errors and simplifies parsing to reduce hidden failure modes.

  • Fail-fast shell semantics

    • Updated the report_failed_workflows.yml run block to use set -euo pipefail so command, unset-variable, and pipeline failures correctly fail the step/job.
  • Safer workflow parsing path

    • Replaced the base64 + nested jq decode flow with a single jq -r TSV output parsed directly in the shell loop.
    • This removes extra decode/parsing stages that could emit hidden errors while the job still appeared successful.
  • Test scope correction

    • Removed the prior grep-only simulated unit test (tests/unit/test_unit_report_failed_workflows_uses_pipefail.sh) since it did not validate real behavior.
run: |
  set -euo pipefail
  gh api "/repos/${GITHUB_REPOSITORY}/actions/runs?per_page=100" | jq -r ...

Copilot AI linked an issue Jun 1, 2026 that may be closed by this pull request
@plengauer
Copy link
Copy Markdown
Owner

Hello, thanks for contributing for the first time!

Copilot AI changed the title [WIP] Fix hidden failure in workflow log Fail report_failed_workflows job on hidden pipeline errors Jun 1, 2026
Copilot AI requested a review from plengauer June 1, 2026 12:36
Copy link
Copy Markdown
Owner

@plengauer plengauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot dont add simulated tests, add that to your memory!!!!
also, dont just add a pipefail, analyze the code and figure out whats wrong and fix it!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jun 1, 2026

@copilot dont add simulated tests, add that to your memory!!!!
also, dont just add a pipefail, analyze the code and figure out whats wrong and fix it!

Addressed in commit 0ea4781.

I removed the simulated grep-only test and updated the workflow logic itself: the step now uses set -euo pipefail and parses jq output directly as TSV in a single jq pass, eliminating the base64 + nested jq parsing path that could emit hidden errors without failing the job.

Copilot AI changed the title Fail report_failed_workflows job on hidden pipeline errors Fail report_failed_workflows job on hidden reporting pipeline errors Jun 1, 2026
Copilot AI requested a review from plengauer June 1, 2026 14:27
@plengauer plengauer marked this pull request as ready for review June 1, 2026 14:47
@plengauer plengauer requested a review from moflwi as a code owner June 1, 2026 14:47
Copilot AI review requested due to automatic review settings June 1, 2026 14:47
@plengauer plengauer enabled auto-merge (squash) June 1, 2026 14:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the scheduled “Report Failed Workflows” GitHub Actions job so it reliably fails when the reporting pipeline encounters real command/pipeline errors, reducing the chance of silently-successful runs that didn’t actually complete the reporting logic.

Changes:

  • Enabled fail-fast shell behavior in the reporting step via set -euo pipefail.
  • Simplified workflow-run parsing by switching from base64-encoded JSON objects to jq -r TSV output read directly by the shell loop.

@plengauer plengauer merged commit 285dc86 into main Jun 2, 2026
1139 of 1141 checks passed
@plengauer plengauer deleted the copilot/hidden-failure-in-workflow branch June 2, 2026 08:32
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.

Hidden failure in workflow

4 participants