You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit introduces a prioritized, cascading job pattern checking
feature to the `print_workflow_run_errors.py` script.
Key changes:
- The `--job-pattern` argument now uses `action='append'`, allowing users
to specify multiple patterns. These are checked in the order provided.
- If no `--job-pattern` is specified by the user, a default prioritized
sequence is used: `['^build.*', '^test.*', '.*']`.
- The script iterates through the determined list of patterns:
- For the first pattern that matches jobs AND has failures among those
matched jobs, the script processes and displays logs for those
failures.
- It then stops checking subsequent patterns.
- If a pattern results in no matching jobs, or if all matching jobs
succeeded, the script moves to the next pattern in the sequence.
- Informative messages are printed to stderr indicating which pattern is
being checked, the outcome for that pattern, and if subsequent
patterns are skipped.
- The main log processing loop has been refactored into a helper function
`_process_and_display_logs_for_failed_jobs` for better organization.
- Handles invalid regular expressions within the pattern list by warning
the user and skipping the invalid pattern.
0 commit comments