Skip to content

fix(e2b): align timeout lifecycle semantics#629

Draft
AiRanthem wants to merge 1 commit into
openkruise:masterfrom
AiRanthem:fix/extend-both-timeout-lifecycle-260710
Draft

fix(e2b): align timeout lifecycle semantics#629
AiRanthem wants to merge 1 commit into
openkruise:masterfrom
AiRanthem:fix/extend-both-timeout-lifecycle-260710

Conversation

@AiRanthem

Copy link
Copy Markdown
Member

What changed

  • align sandbox timeout updates across create, connect, pause, resume, claim, and clone flows
  • preserve both running and paused timeout dimensions when only one dimension is updated
  • keep paused-retention parsing policy-free and resolve defaults at the appropriate boundary
  • add and update unit coverage for timeout merge and lifecycle behavior

Why

Timeout writes previously reconstructed lifecycle state from incomplete inputs, which could overwrite the other timeout dimension or apply the wrong paused-retention policy. The updated flow merges timeout changes against fresh sandbox state and keeps controller and sandbox-manager policy boundaries separate.

Impact

E2B timeout operations now retain the unaffected lifecycle deadline while updating the requested timeout, including pause/resume and sandbox creation-related paths.

Validation

env GOFLAGS=-mod=readonly GOCACHE=/private/tmp/go-build-cache go test ./pkg/controller/sandbox ./pkg/pausedretention ./pkg/sandbox-manager/infra ./pkg/sandbox-manager/infra/sandboxcr ./pkg/servers/e2b ./pkg/utils/timeout

- Extend PauseTime and ShutdownTime independently on connect and resume for auto-pause sandboxes.
- Anchor create timeouts after claim or clone finishes instead of at request start.
- Treat dead claimed sandboxes as not found in DescribeSandbox by using live-state lookup.

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
@kruise-bot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign zmberg for approval by writing /assign @zmberg in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kruise-bot

Copy link
Copy Markdown

@AiRanthem: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants