Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion sdks/python/apache_beam/yaml/yaml_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,13 @@ def _create_venv_from_clone(

@classmethod
def _create_venv_to_clone(cls, base_python: str) -> str:
if '.dev' in beam_version:
# For '.dev', the default clone source is the venv that owns base_python.
# In CI that is often the active tox/sandbox tree; clonevirtualenv can
# race with ephemeral paths (tmp/, caches) under that tree. Use the
# scratch clonable venv in CI instead. Locally, keep cloning the dev venv
# for speed.
_ci = os.environ.get('CI', '').lower() in ('true', '1', 'yes')
if '.dev' in beam_version and not _ci:
base_venv = os.path.dirname(os.path.dirname(base_python))
print('Cloning dev environment from', base_venv)
return base_venv
Expand Down
Loading