fix(runner) - bru runner stopecution should halt the entire run (refactoring) - #9285
sharan-bruno wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughThe run command now uses ChangesRun bail result handling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to The refactor preserves bail skipped-result output, with no identified merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Skipped requests gather in line Comment |
BRU-4204
Actual Fix PR is in EE - 1793
Description
Small cleanup in the CLI collection runner (packages/bruno-cli/src/commands/run.js) around the --bail handling. No behaviour change: terminal output, summary table, and reporter output for bail-skipped requests are identical before and after.
Problem
Two leftovers from the original --bail implementation:
bailInfo was assigned when bail triggered but never read anywhere, so it was dead state.
The placeholder result pushed for each request skipped by bail was a 30-line inline object literal inside the bail branch. That made the branch hard to scan and left no reusable way to synthesise a skipped result for other skip reasons.
Fix
Removed the unused bailInfo local and its assignment.
Extracted the placeholder literal into a createSkippedResult(requestItem, skipReason) helper, declared next to runSingleRequestByPathname so it closes over collectionPath. The bail branch now just pushes createSkippedResult(ri, 'bail') for each remaining request.
Screenshots
Contribution Checklist:
Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.
Summary by CodeRabbit