Skip to content

fix(python): enforce lifecycle wait deadlines - #3828

Closed
dipeshbabu wants to merge 1 commit into
NVIDIA:mainfrom
dipeshbabu:fix-python-wait-deadlines/dipeshbabu
Closed

dipeshbabu wants to merge 1 commit into
NVIDIA:mainfrom
dipeshbabu:fix-python-wait-deadlines/dipeshbabu

Conversation

@dipeshbabu

Copy link
Copy Markdown

Summary

Bound Python SDK lifecycle waits by their requested timeout, including lookup RPCs and polling delays. Previously a short wait could spend the full client timeout in GetSandbox and then sleep beyond its remaining budget; wall-clock changes could also alter the duration.

Related Issue

No issue required: localized correction of the existing wait timeout contract, without a public API change.

Changes

  • Use monotonic deadlines for readiness, stopped-state, and deletion waits.
  • Cap each lookup and polling delay by remaining time while retaining shorter per-call timeouts.
  • Preserve sandbox state handling, identity-aware deletion, and unrelated RPC errors.
  • Add deterministic and loopback gRPC regressions and document timeout behavior.

Testing

  • mise run pre-commit passes. Attempted with --skip-tools; stopped on missing markdownlint-cli2. The commit hook was bypassed after this failed attempt; the passing checks below do not establish full CI success.
  • Unit tests added: 24 wait regression/preservation cases; 169 relevant tests pass.
  • Ruff lint/format, ty, license headers, and docs navigation pass.
  • Full mise run ci passes. Currently blocked by missing tools; full Python suite has the same 19 Windows failures on the unchanged baseline.
  • E2E tests added/updated (not applicable to this SDK polling change).

Checklist

  • Follows Conventional Commits.
  • Commit is signed off (DCO).
  • Architecture and SDK documentation updated.

Signed-off-by: Dipesh Babu <dipeshmahato@outlook.com>
@copy-pr-bot

copy-pr-bot Bot commented Sep 29, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

Copy link
Copy Markdown

Thank you for your interest in contributing to OpenShell, @dipeshbabu.

This project uses a vouch system for first-time contributors. Before submitting a pull request, you need to be vouched by a maintainer.

To get vouched:

  1. Open a Vouch Request discussion.
  2. Describe what you want to change and why.
  3. Write in your own words — do not have an AI generate the request.
  4. A maintainer will comment /vouch if approved.
  5. Once vouched, open a new PR (preferred) or reopen this one after a few minutes.

See CONTRIBUTING.md for details.

@github-actions github-actions Bot closed this Sep 29, 2026
@github-actions

Copy link
Copy Markdown

Thank you for your submission! We ask that you sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by adding a comment below using this text:


I have read the DCO document and I hereby sign the DCO.


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the DCO Assistant Lite bot.

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