Skip to content

fix: show user-friendly broker errors for remote CLI commands#10118

Closed
harshang03 wants to merge 2 commits into
celery:mainfrom
harshang03:fix-9722-friendly-status-errors
Closed

fix: show user-friendly broker errors for remote CLI commands#10118
harshang03 wants to merge 2 commits into
celery:mainfrom
harshang03:fix-9722-friendly-status-errors

Conversation

@harshang03

@harshang03 harshang03 commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace raw tracebacks from broker connection failures in remote CLI commands with concise, user-friendly errors.
  • Add a shared remote-command error translator and apply it to status, inspect, control, graph workers, and events command paths.
  • Keep non-connection CLI errors concise as command-scoped failures without traceback output.

Test plan

  • .venv/bin/python -m pytest t/unit/bin/test_control.py -q
  • .venv/bin/pre-commit run --files celery/bin/base.py celery/bin/control.py celery/bin/events.py celery/bin/graph.py t/unit/bin/test_control.py
  • Manual check: .venv/bin/celery --broker amqp://[email protected]:5672// status -t 1

issue #9722

Convert broker connection failures in `status` into concise actionable CLI errors instead of tracebacks, and apply the same error handling path to related remote CLI flows.
Add regression coverage for broker-unreachable and unexpected-error handling in status/graph/events command paths.
@auvipy
auvipy requested a review from Copilot February 14, 2026 07:36

Copilot AI 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.

Copilot wasn't able to review any files in this pull request.

@auvipy
auvipy self-requested a review February 14, 2026 07:37
@auvipy auvipy added this to the 5.7.0 milestone Feb 14, 2026
@codecov

codecov Bot commented Feb 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 67.74194% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.77%. Comparing base (e28c952) to head (5259697).
⚠️ Report is 88 commits behind head on main.

Files with missing lines Patch % Lines
celery/bin/control.py 69.23% 4 Missing ⚠️
celery/bin/events.py 55.55% 3 Missing and 1 partial ⚠️
celery/bin/base.py 77.77% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10118      +/-   ##
==========================================
- Coverage   87.77%   87.77%   -0.01%     
==========================================
  Files         153      153              
  Lines       19417    19438      +21     
  Branches     2231     2233       +2     
==========================================
+ Hits        17044    17062      +18     
  Misses       2076     2076              
- Partials      297      300       +3     
Flag Coverage Δ
unittests 87.76% <67.74%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@auvipy auvipy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can you please improve the test coverage?

@auvipy

auvipy commented Mar 11, 2026

Copy link
Copy Markdown
Member

superseded by #10190

@auvipy auvipy closed this Mar 11, 2026
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.

3 participants