Skip to content

Bound orchestrator storage waits - #330

Open
morgan-wowk wants to merge 1 commit into
masterfrom
tangle-inv-26772-p1
Open

Bound orchestrator storage waits#330
morgan-wowk wants to merge 1 commit into
masterfrom
tangle-inv-26772-p1

Conversation

@morgan-wowk

Copy link
Copy Markdown
Collaborator

What

  • Add GoogleCloudStorageProviderWithTimeout — a GCS StorageProvider that passes an explicit per-request timeout= to every GCS call (upload / download / exists / get_info / list_blobs). The timeout is configurable via TANGLE_GCS_REQUEST_TIMEOUT_SECONDS (default 60s).
  • Wire the Kubernetes launchers (kubernetes_launchers, google_kubernetes_launchers) to construct and use it.
  • Bound the orchestrator retry loop with a wall-clock deadline (TANGLE_ORCHESTRATOR_RETRY_DEADLINE_SECONDS, default 180s) via a new RetryDeadlineExceededError, so retries can no longer spin unbounded.
  • Document every storage-provider function with the concrete Tangle use cases it serves (docstrings only; no behavior change).
  • Add tests for the timeout provider and the retry deadline.

Why / system impact

Before: GCS calls relied on the client's default (effectively unbounded) timeout. A single hung GCS request could wedge the orchestrator's poll loop indefinitely, stalling all execution processing.

After: every storage wait is bounded. A slow or stuck GCS request now fails fast and is retried within a deadline instead of blocking the loop, so one bad request degrades a single execution rather than the whole orchestrator.

Paired change

A consumer opts in by constructing this provider instead of the upstream GoogleCloudStorageProvider. The paired consumer change is linked in a follow-up comment.

Add a timeout-aware GCS storage provider using google-cloud-storage's official per-call timeout parameter, wire GCS launchers through it, and bound the orchestrator retry helper with a configurable wall-clock deadline.

Co-authored-by: Morgan Wowk <morgan.wowk@shopify.com>
@morgan-wowk
morgan-wowk requested a review from a team August 14, 2026 20:00
@morgan-wowk
morgan-wowk requested a review from Ark-kun as a code owner August 14, 2026 20:00
timeout=self._request_timeout,
)

def _download_from_uri(self, source_uri: str, destination_path: str):
@morgan-wowk

Copy link
Copy Markdown
Collaborator Author

Paired consumer change (opts into the new timeout-bounded provider): Shopify/oasis-backend#507 → https://github.com/Shopify/oasis-backend/pull/507

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