Skip to content

fix(deploy): status shows why a deployment failed and its worker counts (BE-16742) - #927

Merged
vqt123 merged 3 commits into
mainfrom
vinh/be-16742-status-full-read
Sep 23, 2026
Merged

vqt123 merged 3 commits into
mainfrom
vinh/be-16742-status-full-read

Conversation

@vqt123

@vqt123 vqt123 commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

comfy deploy status always printed no failure reason and "Serving: not sampled yet", because it read the deployment list, whose rows leave out error and serving. Without --watch it now reads the chosen deployment from the single-deployment endpoint, as --watch and deploy show already do. comfy deploy logs with nothing captured now says no container has started and points at comfy deploy events.

Tests: a new test whose list rows omit error and serving checks that status reports both; the logs test checks the new line.

BE-16742

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 33b8d4db-f0f9-4996-9c37-34d99ee117f7

📥 Commits

Reviewing files that changed from the base of the PR and between 3ceb13e and 1cc4c4f.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • comfy_cli/command/deploy_status.py
  • tests/comfy_cli/command/test_deploy_status.py

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The status command retrieves full deployment details and displays deployment errors and serving sample age. The logs command explains when a deployment has no log and points to deployment events. Tests cover both commands, and the changelog records the changes.

Changes

Deployment CLI fixes

Layer / File(s) Summary
Full deployment status retrieval and rendering
comfy_cli/command/deploy_status.py, tests/comfy_cli/command/test_deploy_status.py, CHANGELOG.md
Status retrieves full deployment details before rendering. Terminal output includes deployment errors and the age of serving samples. Tests cover omitted summary fields, error output, and sample-age formatting.
Deployment log availability message
comfy_cli/command/deploy_read.py, tests/comfy_cli/command/test_deploy_read.py
When a deployment has no log or captured timestamp, the CLI explains that the log is captured when the health check finishes and points to comfy deploy events --deployment <id>. The test checks this message and hint.

Merge Risk: ⚪ Minimal · up to 1cc4c

The deployment status and logs changes are ready to merge after normal checks.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
✨ Simplify code
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@comfy-greenlight-bot

comfy-greenlight-bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Swarmhost agentic review

The detailed evaluation is available to employees in the internal Slack review thread.

Evaluation budget remaining for this pull request: 96 automatic and 99 manual.

Updated by Swarmhost's agentic review process.

@james00012 james00012 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Holding on the failure reason in terminal output. Reads as: status reads the chosen deployment in full, and logs points at events when the server has no log. Head 8c07582, judged as comfy-cli's owner.

Must

  • Correctness: a failed deployment still shows no reason in the terminal comfy_cli/command/deploy_status.py:212. Only JSON output carries the error, so a person still sees the problem the ticket names.

Optional

  • Correctness: worker counts show a timestamp, not the sample's age comfy_cli/command/deploy_status.py:178. The ticket's criterion asks for the age.
  • Correctness: logs tells a booting deployment that no container has started comfy_cli/command/deploy_read.py:100. The server records no capture until the health check ends.
  • Tests: the new test gives a failed deployment worker counts, which the server never sends tests/comfy_cli/command/test_deploy_status.py:202. Add a ready case and a terminal-output failed case.

Clean: Modularity, Scope, Verbosity, Resilience, Access, Reachability, Contract, Rollout.
Native review: 8 findings, folded into the list above.
Checked: The single-deployment read on comfy-deploy main returns the error and the sample, scoped to the workspace. Both new tests fail on main. The red GPU job fails on main too.
Bots: CodeRabbit and Swarmhost raised nothing; cursor-review did not run.

The deployment list is a summary without error or serving, so status
always printed no failure reason and "not sampled yet". Without --watch
the chosen deployment is now read again from the single-deployment
endpoint; --watch already polled it.
A deployment that failed while staging its models never booted a container,
so it has no log; the empty output now says so and names the command that
does show what happened.
…E-16742)

Reading the deployment in full put `error` and `serving` in the payload, but
only `--json` showed them, so the terminal still answered "why did my deploy
fail?" with nothing. Print the reason beside the status line, and print how old
the worker-count sample is beside the counts, which is what the criterion asked
for: the counts are a snapshot refreshed on the control plane's own schedule and
a deployment whose endpoint stopped answering keeps the last one, so a bare
timestamp does not say whether they still describe now. An unparseable
`sampledAt` degrades to "age unknown" rather than raising out of the renderer,
where nothing catches ValueError.

`deploy logs` no longer tells a booting deployment that no container has
started. The log is written when the health check finishes, so an empty one is
equally the state of a deployment still coming up; the line now names both and
points at `comfy deploy events` to tell them apart.

Tests: the failed-deployment fixture no longer carries worker counts, which the
server never sends for a status that has released its compute; the full read is
covered once through a failed deployment's error and once through a ready one's
counts, and the reason is asserted through the terminal, not the JSON.

@james00012 james00012 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving. Reads as: status reads the chosen deployment in full and prints its failure reason and the sample's age; logs explains an empty log and points at events. Head 3ceb13e, judged as comfy-cli's owner.

Optional

  • Contract: the deploy skill still tells agents status cannot say why a deployment failed comfy_cli/skills/comfy-deploy/SKILL.md:219. Agents read that doc, and status now prints the reason.
  • Tests: one assertion guards against text that never shipped tests/comfy_cli/command/test_deploy_read.py:195. Only the round 1 commit printed that line, so the assertion cannot fail.

Clean: Modularity, Correctness, Scope, Verbosity, Resilience, Access, Reachability, Rollout.
Native review: 9 findings, folded into the list above.
Checked: All four round 1 items are fixed in the pushed code. The reason prints for failed, stop failed and under watch. Seven new tests fail on main, and all 50 pass on the head.
Bots: CodeRabbit had not finished this head and raised nothing on the last; Swarmhost raised nothing.

@vqt123
vqt123 force-pushed the vinh/be-16742-status-full-read branch from 3ceb13e to 1cc4c4f Compare September 23, 2026 15:51
@vqt123
vqt123 merged commit 000c577 into main Sep 23, 2026
16 of 18 checks passed
@vqt123
vqt123 deleted the vinh/be-16742-status-full-read branch September 23, 2026 17:26
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants