[PR #18] [MERGED] fix: read what gcloud actually said, and repeat the zone it suggests #18

Closed
opened 2026-10-31 22:02:41 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-qa-tools/pull/18
Author: @aliranjah
Created: 8/25/2026
Status: ✅ Merged
Merged: 8/25/2026
Merged by: @aliranjah

Base: main ← Head: fix/read-gcloud-errors


📝 Commits (1)

  • 238a2d7 fix: read what gcloud actually said, and repeat the zone it suggests

📊 Changes

5 files changed (+167 additions, -26 deletions)

View changed files

📝 comfy_qa/gcloud.py (+53 -11)
📝 comfy_qa/lifecycle.py (+43 -8)
📝 docs/troubleshooting.md (+7 -4)
📝 tests/test_auth.py (+24 -3)
📝 tests/test_lifecycle.py (+40 -0)

📄 Description

$ comfy-qat host go comfy-win
  comfy-win is stopped — starting it

could not start comfy-win: ---

--- is literally what gcloud's ERROR: line contains:

ERROR: (gcloud.compute.instances.start) ---
code: ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS
errorDetails:
- localizedMessage:
    message: A g2-standard-8 VM instance with 1 nvidia-l4 accelerator(s) is currently
      unavailable in the us-central1-a zone. Consider trying your request in the us-central1-b
      zone(s), which currently has capacity to accommodate your request.

Compute errors put the real sentence under localizedMessage, wrapped across
indented lines, and leave the summary as a separator. The capacity check added in
#17 classified on that summary — so it matched nothing and never fired.

Fixes

  • GcloudError carries the full output, and classification reads that rather
    than the summary.
  • A summary that is only punctuation falls through to the localizedMessage, so
    what gets reported is the sentence a person can act on.
  • ZONE_RESOURCE_POOL_EXHAUSTED and "is currently unavailable in the" join
    STOCKOUT as capacity signals.
  • Google names a zone that has capacity, so the fix line repeats it: "Google
    says us-central1-b has capacity right now — a box there would start today."
    That
    is the most useful thing this tool can do with the error.

Note

Fixtures are the exact bytes gcloud printed, not a reconstruction. That is the third
time this project has been bitten by a hand-written fixture; it is now the rule.

219 tests, 3 new.

🤖 Generated with Claude Code

https://claude.ai/code/session_015X8c3zczxydWiPfhnxfYNx


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/comfy-qa-tools/pull/18 **Author:** [@aliranjah](https://github.com/aliranjah) **Created:** 8/25/2026 **Status:** ✅ Merged **Merged:** 8/25/2026 **Merged by:** [@aliranjah](https://github.com/aliranjah) **Base:** `main` ← **Head:** `fix/read-gcloud-errors` --- ### 📝 Commits (1) - [`238a2d7`](https://github.com/Comfy-Org/comfy-qa-tools/commit/238a2d74acf49d824059aad3e9f4e22c2297f570) fix: read what gcloud actually said, and repeat the zone it suggests ### 📊 Changes **5 files changed** (+167 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `comfy_qa/gcloud.py` (+53 -11) 📝 `comfy_qa/lifecycle.py` (+43 -8) 📝 `docs/troubleshooting.md` (+7 -4) 📝 `tests/test_auth.py` (+24 -3) 📝 `tests/test_lifecycle.py` (+40 -0) </details> ### 📄 Description ``` $ comfy-qat host go comfy-win comfy-win is stopped — starting it could not start comfy-win: --- ``` `---` is literally what gcloud's `ERROR:` line contains: ``` ERROR: (gcloud.compute.instances.start) --- code: ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS errorDetails: - localizedMessage: message: A g2-standard-8 VM instance with 1 nvidia-l4 accelerator(s) is currently unavailable in the us-central1-a zone. Consider trying your request in the us-central1-b zone(s), which currently has capacity to accommodate your request. ``` Compute errors put the real sentence under `localizedMessage`, wrapped across indented lines, and leave the summary as a separator. The capacity check added in #17 classified on that summary — so it matched nothing and **never fired**. ## Fixes - **`GcloudError` carries the full output**, and classification reads that rather than the summary. - **A summary that is only punctuation falls through** to the `localizedMessage`, so what gets reported is the sentence a person can act on. - `ZONE_RESOURCE_POOL_EXHAUSTED` and "is currently unavailable in the" join `STOCKOUT` as capacity signals. - **Google names a zone that has capacity, so the fix line repeats it**: *"Google says us-central1-b has capacity right now — a box there would start today."* That is the most useful thing this tool can do with the error. ## Note Fixtures are the exact bytes gcloud printed, not a reconstruction. That is the third time this project has been bitten by a hand-written fixture; it is now the rule. 219 tests, 3 new. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015X8c3zczxydWiPfhnxfYNx --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 22:02:41 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-qa-tools#18
No description provided.