GeezerVison is showing github.com — fix: return an error when pipeline prepare fails by somaz94 · Pull Request #11239 · updatecli/updatecli
Conversation
somaz94
commented
Nov 6, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Fix #11232
updatecli pipeline prepare (and the deprecated updatecli prepare) logged the error returned by Prepare but did not return it from run(), so the command exited 0 even when no pipeline could be loaded. The diff and apply branches already return the same error, so prepare now does the same and exits 1.
Test
To test this pull request, you can run the following commands:
cd cmd
go test -run TestRunPrepareReturnsError
TestRunPrepareReturnsError runs both commands against an invalid manifest and fails without the change. With a build of this branch, the reproduction from the issue now prints PREPARE_EXIT=1 and DIFF_EXIT=1.
Additional Information
Checklist
- I have updated the documentation via pull request in website repository.
- I have tested this pull request manually with a custom Updatecli build and it works as expected.
Tradeoff
None that I found.
Potential improvement
The manifest/init branch of run() has the same missing return err after Scaffold fails. I left it out to keep this to the issue, and can send it separately.
Summary by CodeRabbit
- Bug Fixes
- Prepare commands now return an error when preparation fails instead of appearing to complete successfully. This makes failures visible to callers and command-line workflows, allowing them to respond appropriately. The fix applies both to the standalone prepare command and to the prepare stage invoked through a pipeline.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 6, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Walkthrough
-
The prepare command now returns errors from Engine.Prepare after logging them. A regression test covers both prepare and pipeline/prepare with an invalid manifest.
Changes: Prepare error propagation
| Layer / File(s) |
Summary |
Return and test preparation errors cmd/root.go, cmd/root_test.go |
The prepare command returns errors from Engine.Prepare after logging them. A table-driven test checks prepare and pipeline/prepare with an invalid manifest. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested labels: bug, core
Suggested reviewers: olblak
Merge Risk: Minimal · previous review b4cab
-
The prepare commands now report invalid-manifest failures as errors. No merge-blocking issue is identified.
Pre-merge checks: 3 · 2
-
Failed checks: 2 warnings
| Check name |
Status |
Explanation |
Resolution |
| Linked Issues check |
 |
[#11232] run now returns the preparation error, and the existing CLI handler exits 1 on that error. The added test checks run directly for both prepare commands. It does not invoke the CLI or asse… |
Add a CLI regression test that runs pipeline prepare with a malformed single manifest and asserts a nonzero exit code. |
| Docstring Coverage |
 |
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… |
Write docstrings for the functions missing them to satisfy the coverage threshold. |
Passed checks: 3 passed
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title clearly describes the change to return preparation errors. |
| Description check |
 |
The description includes the issue, change, test instructions, checklist, tradeoff, and potential improvement. |
| Out of Scope Changes check |
 |
[#11232] Returning the preparation error and testing both prepare command paths support the issue. The deprecated command shares the affected branch. |
Full details: Linked Issues check
-
Explanation
[#11232] run now returns the preparation error, and the existing CLI handler exits 1 on that error. The added test checks run directly for both prepare commands. It does not invoke the CLI or assert a nonzero process exit code, as the issue requests.
Resolution
Add a CLI regression test that runs pipeline prepare with a malformed single manifest and asserts a nonzero exit code.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 2 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
bug
Something isn't working
core
All things related to Updatecli core engine
Milestone
No milestone
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.
|