Skip to content

fix: fix(run,session): keep local record on failed unassign - #315

Merged
sethtroisi merged 1 commit into
googlecolab:mainfrom
sethtroisi:fix-orphaned-session-stop
Dec 3, 2026
Merged

sethtroisi merged 1 commit into
googlecolab:mainfrom
sethtroisi:fix-orphaned-session-stop

Conversation

@sethtroisi

Copy link
Copy Markdown
Collaborator

In colab run teardown, do not remove the local session record (or log session_terminated) when unassign fails; instead log a warning and print a colab stop -s <name> retry hint to stderr so the session stays addressable.

In colab stop -s <target>, fall back to list_assignments() and match by server endpoint when no local session matches by name, allowing orphaned ([?]) assignments shown in colab sessions to be stopped directly.

Refs: #309

…ping by endpoint

In `colab run` teardown, do not remove the local session record (or log
session_terminated) when `unassign` fails; instead log a warning and print a
`colab stop -s <name>` retry hint to stderr so the session stays addressable.

In `colab stop -s <target>`, fall back to `list_assignments()` and match by
server endpoint when no local session matches by name, allowing orphaned
(`[?]`) assignments shown in `colab sessions` to be stopped directly.

Refs: googlecolab#309
@sethtroisi
sethtroisi merged commit a28eb1b into googlecolab:main Dec 3, 2026
7 checks passed
@sethtroisi
sethtroisi deleted the fix-orphaned-session-stop branch December 3, 2026 22:33
doggy8088 added a commit to doggy8088/google-colab-cli that referenced this pull request Dec 4, 2026
上游變更:googlecolab#315 `colab stop` 端點備援(以伺服器端點停止孤兒分配,`_teardown` 失敗時保留本地記錄並提示重試)、googlecolab#316 空 POST 以最小 JSON 內文避免 HTTP 411。
更新譯文:docs/01_session_management.md、docs/05_run_command.md(log、端點備援說明、拆除流程與測試案例)。
其餘檔案隨 main 鏡像;常駐偏離 .github/workflows/pages.yml、scripts/build_site.py 保留。
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.

2 participants