Skip to content

Commit b9a0c2b

Browse files
eddiep24eddiephillips
andauthored
Requirements_cache shouldn't create a cache folder when skipped. (#31961)
* If the requirements cache is skipped then we shouldn't generate a requirements_cache folder. * pre-commit --------- Co-authored-by: eddiephillips <[email protected]>
1 parent 496e712 commit b9a0c2b

File tree

1 file changed

+2
-1
lines changed
  • sdks/python/apache_beam/runners/portability

1 file changed

+2
-1
lines changed

sdks/python/apache_beam/runners/portability/stager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ def create_job_resources(options, # type: PipelineOptions
214214
os.path.join(tempfile.gettempdir(), 'dataflow-requirements-cache') if
215215
(setup_options.requirements_cache is None) else
216216
setup_options.requirements_cache)
217-
if not os.path.exists(requirements_cache_path):
217+
if (setup_options.requirements_cache != SKIP_REQUIREMENTS_CACHE and
218+
not os.path.exists(requirements_cache_path)):
218219
os.makedirs(requirements_cache_path)
219220

220221
# Stage a requirements file if present.

0 commit comments

Comments
 (0)