Skip to content

feat: add contrib.workdir for remote-backed activity workspaces#1375

Draft
saeedseyfi wants to merge 1 commit intotemporalio:mainfrom
saeedseyfi:contrib/workdir
Draft

feat: add contrib.workdir for remote-backed activity workspaces#1375
saeedseyfi wants to merge 1 commit intotemporalio:mainfrom
saeedseyfi:contrib/workdir

Conversation

@saeedseyfi
Copy link

Summary

  • Adds temporalio.contrib.workdir module that syncs a local directory with remote storage before/after activity execution
  • Uses fsspec for storage abstraction (GCS, S3, Azure, local, memory)
  • Workspace async context manager for generic use, @workspace decorator + get_workspace_path() for Temporal activities

Closes #1373

Test plan

  • Unit tests with memory:// fsspec backend (no cloud deps)
  • Integration test with real Temporal worker (write in one activity, read in another)
  • CI passes (lint, type checks, tests)

Temporal activities that read/write files can't scale to multiple workers
because disk is local. This module syncs a local directory with remote
storage (GCS, S3, Azure, etc.) via fsspec before and after activity
execution.

Closes temporalio#1373
@CLAassistant
Copy link

CLAassistant commented Mar 18, 2026

CLA assistant check
All committers have signed the CLA.

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.

Feature: contrib.workdir — Remote-backed workspace for file-based activities

2 participants