Skip to content

fix(ingest): cancel command exits 0 on success - #225

Merged
eddietejeda merged 1 commit into
mainfrom
fix/cancel-exit-code
Jul 14, 2026
Merged

eddietejeda merged 1 commit into
mainfrom
fix/cancel-exit-code

Conversation

@eddietejeda

Copy link
Copy Markdown
Contributor

Summary

  • cancel_import was unconditionally calling std::process::exit(1), making a successful cancel look like a failure to callers and scripts
  • Exit code 1 belongs to terminal-failure statuses (failed, cancelled) in status / poll_ingest — the cancel command itself succeeded
  • Found while testing hotdata ingest cancel against prod after the 0.17.0 release

Test plan

  • hotdata ingest cancel <id> on a pending/running import exits 0 and prints the cancelled status
  • hotdata ingest status <id> still exits 1 when status is cancelled
  • hotdata ingest status <id> --wait still terminates with exit 1 on a cancelled import (not an infinite loop)

cancel_import was unconditionally calling std::process::exit(1),
making a successful cancel indistinguishable from a failure. Exit code
1 is reserved for terminal-failure statuses (failed, cancelled) in
status / poll_ingest — the cancel command itself succeeded.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the control flow: on success with_spinner returns the ack and cancel_import now returns normally (exit 0); error paths still exit non-zero via e.exit(). Correct fix — exit 1 is reserved for terminal-failure statuses in status/poll_ingest, not the cancel command itself.

@eddietejeda
eddietejeda merged commit e1cbebc into main Jul 14, 2026
13 checks passed
@eddietejeda
eddietejeda deleted the fix/cancel-exit-code branch July 14, 2026 20:20
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

1 participant