[eas-cli] Check non-interactive mode before fetching context in submit:cancel and submit:retry - #4141
Conversation
…t:cancel and submit:retry
|
Subscribed to pull request
Generated by CodeMention Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4141 +/- ##
=======================================
Coverage 62.43% 62.43%
=======================================
Files 1009 1009
Lines 45735 45735
Branches 9621 9621
=======================================
Hits 28548 28548
- Misses 15724 15726 +2
+ Partials 1463 1461 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
✅ Thank you for adding the changelog entry! |
🤖 AI code reviewDecision: Approve Overall PR risk: Medium. The change modifies existing behavior in the non-interactive submit cancel and retry paths. Scripts could observe a different validation order or error path when no submission ID exists. No reviewer reported a warning or critical finding. No findings. This review is advisory — it never blocks a merge and never auto-approves. |
Why
Follow-up to #4134, addressing @douglowder's review feedback: the "Submission ID must be provided in non-interactive mode" check ran after
getContextAsyncandgetDisplayNameForProjectIdAsync. The command did network work before it failed on invalid input.How
In
submit:cancelandsubmit:retry, the non-interactive check now runs immediately after flag validation, before any context or project lookups. ThegetDisplayNameForProjectIdAsynccall moved inside the interactive branch, since only the interactive submission picker uses the display name.Test Plan
yarn typecheck,yarn lint, andyarn fmt:checkpass.eas submit:cancel --non-interactiveandeas submit:retry --non-interactive(no submission ID) fail immediately with "Submission ID must be provided in non-interactive mode".eas submit:cancelandeas submit:retrystill list submissions with the project display name.🤖 Generated with Claude Code