Skip to content

Propagate dispatch failures in trigger CI script - #2143

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
fix-2141-trigger-dispatch-failures-b3ca7a3be73663eb
Draft

github-actions[bot] wants to merge 1 commit into
mainfrom
fix-2141-trigger-dispatch-failures-b3ca7a3be73663eb

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Fixes scripts/trigger-ci-workflows.sh so dispatch failures are propagated correctly instead of being masked by a piped subshell loop.

  • Replace piped while loops with process-substitution loops so loop state is preserved in the parent shell.
  • Track total, succeeded, and failed dispatch counts during execution.
  • Exit with status 1 when any dispatch fails (non-dry-run), and print a dispatch result summary.
  • Add regression test tests/test_trigger_ci_workflows.py validating non-zero exit when gh workflow run fails.

Closes #2141.

Validation

bash -n scripts/trigger-ci-workflows.sh
python -m pytest tests/test_trigger_ci_workflows.py -v

Notes

uv run --extra test ... could not be used in this environment due a permissions error initializing /home/runner/work/_temp/setup-uv-cache, so validation was run with python -m pytest after installing pytest.


What is this? | From workflow: Trigger Framework Best Practices

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Track dispatch success/failure counts in the parent shell, exit non-zero when any workflow dispatch fails, and add a regression test for failed gh workflow dispatches.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

[framework-best-practices] Propagate dispatch failures in trigger-ci-workflows.sh

0 participants