docs: propose short and stable Sandbox IDs#635
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #635 +/- ##
==========================================
+ Coverage 80.00% 80.05% +0.05%
==========================================
Files 225 229 +4
Lines 17645 17861 +216
==========================================
+ Hits 14117 14299 +182
- Misses 2953 2976 +23
- Partials 575 586 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| check. | ||
|
|
||
| Manager route watch registration and periodic reconciliation move out of `sandboxcr.Infra` into | ||
| the sandbox-manager composition root. Gateway keeps its controller adapter. Both use the same |
There was a problem hiding this comment.
The gateway controller constructs the sandbox ID directly from the reconcile request's namespace/name without reading the Sandbox's label. When short IDs are enabled, this code would still produce the legacy -- key, causing a mismatch with the short ID stored in the registry by other components, please be more specific about the change of sandbox-gateway
There was a problem hiding this comment.
Expanded the gateway adapter design in a4070ab. For a present Sandbox, the reconciler projects a full Route through the injected label-aware resolver and offers it to the shared Store without deriving the registry key from the reconcile request. For NotFound or deleting objects, it deletes authoritatively by ObjectKey; <namespace>--<name> is only the mixed-version fallback when no full ObjectKey record exists. The gateway sweep uses the same watch visibility and inclusion predicate.
|
|
||
| #### Authoritative Sweep | ||
|
|
||
| Both components run the shared Sweeper once after cache synchronization and then every five minutes |
There was a problem hiding this comment.
is it possible to only check the specified routes in doubt, the one "Different UID with equal or unorderable RV". GET is much cheaper than LIST operation
There was a problem hiding this comment.
The original List was intended as a low-frequency background cleanup: once after cache synchronization and then every five minutes with jitter, outside the request and normal reconcile paths. However, at the expected scale of hundreds of thousands of Sandboxes, a full direct List per manager/gateway replica is still too expensive. Revised in afba1b1 to remove the periodic full List. When the Store detects a known ambiguity, it quarantines the ID and returns the affected ObjectKeys and mutation generations. The event adapter enqueues them into a deduplicated, rate-limited repair queue and completes event processing immediately. A worker performs direct Gets only for those keys and applies the authoritative result only if the affected-record generation still matches; transient errors retry with backoff. Normal population and missed-event recovery continue to rely on informer synchronization and List/Watch.
|
/lgtm |
|
New changes are detected. LGTM label has been removed. |
|
/approve |
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
1c10a7b to
6d773b0
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zmberg The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What changed
Why
The current
<namespace>--<name>Sandbox ID is embedded in E2B-compatible dynamic hostnames. Long namespace and Sandbox names can make the resulting DNS name too long to access, even when the Sandbox itself is healthy.The proposal uses a 26-character lowercase Base32 representation of the complete 128-bit Sandbox UID and persists the selected value in
agents.kruise.io/sandbox-id. Unlabeled Sandboxes retain the legacy ID, and the assignment flag remains disabled by default for rollout safety.Impact
This PR changes documentation only; it does not change runtime behavior. It establishes the technical-review contract for a later implementation plan, including compatibility and activation gates.
Validation
git diff --check upstream/master...HEAD