From 3a4ea0ad6a4112d28c3a87f0de66cbf9ce180334 Mon Sep 17 00:00:00 2001 From: Valentyn Tymofieiev Date: Fri, 23 Oct 2026 16:03:18 -0700 Subject: [PATCH 1/2] Correct typo in the staged path. --- sdks/python/apache_beam/options/pipeline_options.py | 4 ++-- .../en/documentation/sdks/python-pipeline-dependencies.md | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sdks/python/apache_beam/options/pipeline_options.py b/sdks/python/apache_beam/options/pipeline_options.py index 5b73b22476b4..3bb849938be3 100644 --- a/sdks/python/apache_beam/options/pipeline_options.py +++ b/sdks/python/apache_beam/options/pipeline_options.py @@ -1994,8 +1994,8 @@ def _add_argparse_args(cls, parser): help=( 'Local path to a file. During job submission, the files will be ' 'staged in the staging area (--staging_location option) and then ' - 'workers will upload them to the worker specific staging location ' - '(e.g. $SEMI_PERSISTENT_DIRECTORY/staged/ for portable runner.')) + 'workers will download them to the worker-specific directory ' + '$SEMI_PERSISTENT_DIRECTORY/staged/.')) parser.add_argument( '--prebuild_sdk_container_engine', help=( diff --git a/website/www/site/content/en/documentation/sdks/python-pipeline-dependencies.md b/website/www/site/content/en/documentation/sdks/python-pipeline-dependencies.md index 7d27f91d322d..3acec3bc42d3 100644 --- a/website/www/site/content/en/documentation/sdks/python-pipeline-dependencies.md +++ b/website/www/site/content/en/documentation/sdks/python-pipeline-dependencies.md @@ -109,10 +109,11 @@ Staged files are downloaded onto the worker: import my_module -* **Data or configuration files**: If you staged non-Python files (such as a JSON config), they are downloaded to the staged files directory. You can locate this directory on the worker by reading the `SEMI_PERSISTENT_DIRECTORY` environment variable, or look for `/tmp/staged` which is the default location for staged files on containerized runners: +* **Data or configuration files**: If you staged non-Python files (such as a JSON config), they are downloaded to the `$SEMI_PERSISTENT_DIRECTORY/staged` directory. The full path depends on the runner, so build it from the environment variable instead of hardcoding it. import os - staged_dir = os.environ.get('SEMI_PERSISTENT_DIRECTORY', '/tmp/staged') + staged_dir = os.path.join( + os.environ.get('SEMI_PERSISTENT_DIRECTORY'), 'staged') config_path = os.path.join(staged_dir, 'data_config.json') ### Importing Plugins on Worker Startup From 4262b47b13141c3a0357fb69f6663d29ae3e565d Mon Sep 17 00:00:00 2001 From: tvalentyn Date: Fri, 23 Oct 2026 16:06:53 -0700 Subject: [PATCH 2/2] Update website/www/site/content/en/documentation/sdks/python-pipeline-dependencies.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../en/documentation/sdks/python-pipeline-dependencies.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/www/site/content/en/documentation/sdks/python-pipeline-dependencies.md b/website/www/site/content/en/documentation/sdks/python-pipeline-dependencies.md index 3acec3bc42d3..3dd3b3c79aab 100644 --- a/website/www/site/content/en/documentation/sdks/python-pipeline-dependencies.md +++ b/website/www/site/content/en/documentation/sdks/python-pipeline-dependencies.md @@ -113,7 +113,7 @@ Staged files are downloaded onto the worker: import os staged_dir = os.path.join( - os.environ.get('SEMI_PERSISTENT_DIRECTORY'), 'staged') + os.environ.get('SEMI_PERSISTENT_DIRECTORY', '/tmp'), 'staged') config_path = os.path.join(staged_dir, 'data_config.json') ### Importing Plugins on Worker Startup