CoderWorkspacePoolMember: recognize a template-wide last_used_at write in a one-member pool
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 30/100
Rechercherichtung
Start from the CoderWorkspacePoolMember logic that compares a workspace's last_used_at with the template's updated_at within a 5 s window, and from the 60 s poll that decides whether a member is Used. Reproduce the case where a template schedule update runs, the template changes again before the next poll, and the pool has one member. Done when that member is no longer marked Used and the single-member and multi-member witness paths are both covered by tests. The suggested fix adds one list call, only when the template time does not match.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Problem
A CoderWorkspacePoolMember treats a later last_used_at as use, except for a template-wide write. It recognizes a template-wide write in two ways: the value is within 5 s of the template's updated_at, or another unclaimed member of the pool already moved its baseline to the same value.
When a template schedule update with update_workspace_last_used_at runs, and the template changes again before the next 60 s poll, and no other member of the pool saw the first write (for example a one-member pool), the member marks itself Used. The pool releases it, and one warm workspace leaks.
This is the fail-safe direction: the controller never deletes a workspace that someone may use. But it costs one workspace per affected member.
Possible fix
Also accept as a witness any other workspace of the template in Coder with the same last_used_at (one list call, only when the template time does not match).
Trigger
Before the PR 12 activation docs of #153, or a user report.
Found by Codex on #343 (comment 4268119093).
Refs #153
Found in review of #343 (thread 4268119093); the plan resolves the ambiguity toward Used, which can leak one warm workspace but never deletes possible work.
Refs #153
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: medium
- Vorherrschende Sprache
- Go
- Sterne
- 5
- Forks
- 3
- Ø Merge
- 3 Std.
- Gemergte PRs (30 T.)
- 192
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus coder/coder-k8s
-
CoderWorkspacePoolMember checkCreate: trust only Coder's own 404 on the name lookup (before PR 12)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
TestReconcile_LicenseRotationUploadsNewSecretValue fails at -count=3 (reuses a control plane name)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
CoderMCPServer Kind E2E follow-upsEvtl. vergeben @ThomasK33 hat das vor 6 Tagen übernommen. Offen
coder/coder-k8s#390 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
CoderMCPServer delete and RBAC test follow-upsEvtl. vergeben @ThomasK33 hat das vor 6 Tagen übernommen. Offen
coder/coder-k8s#378 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Ownership proof for Coder IDs recorded in controller status (D11 B)Evtl. vergeben @ThomasK33 hat das vor 6 Tagen übernommen. Offen
coder/coder-k8s#372 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in coder/coder-k8s
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 69/100
aws/amazon-ecs-agent#5177 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
release-followup
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
kind/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
apache/rocketmq-dashboard#7292 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
[Bug]: Deleting an MCP proxy leaves its API keys in the gateway's memory and in the policy engineOffenAspect/API Aspect/Other Severity/Minor Type/Bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
wso2/api-platform#3852 ·
Maintainer antworten meist innerhalb von 1 Tag