Handle flat single-artifact layout in strict-status reporting#949
Merged
Conversation
Post-merge verification of the workflow_run flow (test PR astropy#948) showed no ubuntu-py313-strict check run was posted: with a pattern matching exactly one artifact, download-artifact extracts it directly into the destination directory instead of a per-artifact subdirectory, so the script's scan for strict-job-outcome-* directories found nothing and returned "nothing to report". Scan for the strict-outcome.json files themselves, supporting both the flat single-artifact layout and the per-artifact subdirectory layout that appears once the expected-failures matrix has more than one entry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M5FNYqVHbKLbVSGJGftLrL
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the strict_status.yml workflow-run reporter so it correctly finds and reports strict job outcomes when actions/download-artifact produces a flat extraction layout for a single matching artifact (rather than creating per-artifact subdirectories). This ensures the expected neutral strict check run (e.g. ubuntu-py313-strict) is posted reliably.
Changes:
- Switch from scanning
strict-job-outcome-*directories to scanningstrict-outcome.jsonfiles to support both flat and per-artifact layouts. - Improve warning messages to reference the JSON file path being read (instead of a directory name).
- Add a fallback naming path for the flat-layout case when the JSON cannot be read.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| } | ||
| if (outcomes.length === 0) { | ||
| core.info('No strict-job-outcome-* artifacts found; nothing to report.'); |
Member
Author
There was a problem hiding this comment.
Good catch — updated the message to say "No strict-outcome.json files found in downloaded artifacts" in 503ce8f, which matches what the script actually scans for now.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M5FNYqVHbKLbVSGJGftLrL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Post-merge verification of the strict-status flow from #942 (via test PR #948) showed that no
ubuntu-py313-strictcheck run was posted, even though the gate and the outcome artifact both worked. Root cause: when thestrict-job-outcome-*pattern matches exactly one artifact,actions/download-artifactextracts it directly intostrict-outcomes/with no per-artifact subdirectory, so the script's scan forstrict-job-outcome-*directories finds nothing and exits with "No strict-job-outcome-* artifacts found; nothing to report" (see the Create check runs step log). The same happened on the concurrent dependabot PR's run, so it is reproducible.This changes the script to scan for the
strict-outcome.jsonfiles themselves, supporting both:The two warning messages now reference the JSON path instead of the directory name, and the flat layout falls back to a generic check name only if the JSON is also unreadable (the JSON normally carries the real matrix name).
Since
workflow_runworkflows execute from the default branch, this takes effect only after merging; re-verify by re-triggering CI on any open PR (e.g. close/reopen #948) and confirming a neutralubuntu-py313-strictcheck with a "failed (expected)" title appears.🤖 Generated with Claude Code
https://claude.ai/code/session_01M5FNYqVHbKLbVSGJGftLrL