Repository navigation
fix(cli): report failures of delete-file and dispatch-workflow - #961
Merged
Merged
Conversation
delete-file failed with an UnboundLocalError when the deletion failed, printed "succeeded" for a file that was not deleted, and took any failed read of the file for an absent file. dispatch-workflow printed a failed dispatch as a plain line and exited with 0. Both commands now report these failures as errors, with the response of GitHub, and exit with 1. An absent file is reported as such and keeps exit code 0. As delete-file runs over all organizations by default, an organization whose configuration lacks the repository, or archives it, is skipped with a warning instead of no output, and keeps exit code 0. --path and --workflow are now required. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: sebastien.heurtematte <sebastien.heurtematte@eclipse-foundation.org>
Only the call expected to raise SystemExit stays inside the block. Reported by SonarQube Cloud (python:S5778). Assisted-by: Claude:claude-opus-5-5 Signed-off-by: sebastien.heurtematte <sebastien.heurtematte@eclipse-foundation.org>
|
netomi
approved these changes
Nov 19, 2026
heurtematte
temporarily deployed
to
pull-request-preview
November 19, 2026 13:24 — with
GitHub Actions
Inactive
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Description
otterdog delete-fileandotterdog dispatch-workflownow report their failures as errors and exit with 1.delete-filealso warns when it skips an organization.delete-fileUnboundLocalError, exit 2, the remaining organizations are skippedWhy a skipped repository is a warning, not an error
delete-fileruns over every organization ofotterdog.json, and most of them do not have the repository given with--repo.main, and the warning only makes the skip visible: before, these organizations printed nothing below their header.sync-templatealso skips these repositories, without a warning.--repotherefore still ends with exit 0, but every organization now prints the warning.dispatch-workflowBoth commands
--pathand--workfloware now required. Without them, the commands requestedcontents/Noneorworkflows/None/dispatches.Related issue
Relates to #959 (follow-ups listed in its notes).
Type of change
Breaking change details
The exit codes of the two commands change for failures that were reported as successes, or that crashed. Scripts may rely on them:
delete-file:dispatch-workflow:--path(delete-file) and--workflow(dispatch-workflow) are required: Click exits with 2 when one is missing. No call that worked omitted them.A repository missing from the configuration, or archived, keeps exit code 0.
Who is affected: CLI users and scripts that run these commands. Configurations and the webapp are not affected.
Tests
tests/Checks run on
7fb0321:Manual testing
How to reproduce / test scenario:**
pytest tests/operations/test_delete_file.py tests/operations/test_dispatch_workflow.py.main, the failed deletion ends withUnboundLocalError, and a failed dispatch exits with 0.Checklist
docs/reference/operations/index.mdonly lists the help lines, which are unchanged, and no page describes the options or exit codes of these commands.