Skip to content

fix: port-forward 429 handling, quick-deploy exit code, exec hints, live tests - #182

Merged
omattsson merged 1 commit into
mainfrom
fix/live-test-findings
Oct 31, 2026
Merged

omattsson merged 1 commit into
mainfrom
fix/live-test-findings

Conversation

@omattsson

Copy link
Copy Markdown
Owner

Fixes from a live test run of stack port-forward and stack exec against k8s-stack-manager on Docker Desktop.

Changes

stack port-forward: a full server tunnel limit no longer kills working tunnels

  • Before: 3 handshakes refused with 429 in a row stopped the whole command, including its open tunnels. 8 parallel downloads against a server limit of 5 gave 0 of 8 completed.
  • A 429 tunnel_limit now gets 3 dial retries (0.5, 1, 2 s, portForward429Delays). That gives a tunnel that drains (up to DrainTimeout) or closes time to free its server slot. The API rate limiter's 429 (no code) is not retried.
  • 3 connections in a row refused with 429 stop the command only while no other connection of the command dials or tunnels (portForwarder.active). A refusal while others are active resets the counter.
  • Live: 8 of 8 parallel downloads complete, and the command keeps running.

template quick-deploy exits 1 when the stack has status error

  • Without a log_id the server created the stack but did not start its deploy, for example because the namespace is still terminating. The error says why and gives the next command, stackctl stack deploy <id>.
  • With a log_id the deploy started and failed at once: the error points to stack logs.
  • The stack is printed first in every output mode. Server fields are sanitized. client.QuickDeployTemplateLog returns the log_id.
  • The server reason comes from fix(deployer): a stop during a deploy no longer leaves the stack stabilizing k8s-stack-manager#726.

stack exec refusal hints

  • The hints no longer repeat the server message. Before: "The container holds a service-account token. The container holds a service-account token, so ...".
  • When the body has no error text, the hint first says what the code means.

Live tests

  • TestLiveWorkflow_FullLifecycle creates a stack from the instantiated definition. Before, it deployed the definition ID and got a 404.
  • FullLifecycle and BulkOperations wait for each operation, so the server no longer refuses the next one.
  • The cleanup waits until no operation runs, and only a 404 counts as deleted.
  • waitStackStatus fails at once on every failed status.

Docs: README, CLAUDE.md, the agent guide and the command help.

Tests

🤖 Generated with Claude Code

…ive tests

Fixes from a live test run against k8s-stack-manager on Docker Desktop.

- stack port-forward: a 429 tunnel_limit gets 3 dial retries (0.5, 1,
  2 s) for tunnels that drain or close; the rate limiter's 429 is not
  retried. 3 connections in a row refused with 429 stop the command only
  while no other connection of the command dials or tunnels, so a full
  server tunnel limit never closes working tunnels (8 parallel downloads
  against a limit of 5: 0 of 8 completed before, 8 of 8 now).
- template quick-deploy: exits 1 when the returned stack has status
  error. Without a log_id the deploy did not start ("fix the cause, then
  run 'stackctl stack deploy <id>'"); with one it started and failed.
  Server fields are sanitized. QuickDeployTemplateLog returns the log_id.
- stack exec: refusal hints no longer repeat the server message; without
  a server text the hint says what the code means.
- Live tests: FullLifecycle creates a stack from the instantiated
  definition; FullLifecycle and BulkOperations wait for each operation;
  the cleanup waits until no operation runs and only a 404 counts as
  deleted; waitStackStatus fails fast on every failed status.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 31, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@omattsson
omattsson merged commit ac6c946 into main Oct 31, 2026
8 checks passed
@omattsson
omattsson deleted the fix/live-test-findings branch October 31, 2026 08:50
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