Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 2 additions & 3 deletions service_configuration_lib/spark_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,12 @@ def _get_k8s_docker_volumes_conf(

for volume in k8s_volumes:
host_path, container_path, mode = volume['hostPath'], volume['containerPath'], volume['mode']
if os.path.exists(host_path) and host_path not in mounted_volumes:
if host_path not in mounted_volumes:
env.update(_get_k8s_volume(host_path, container_path, mode))
mounted_volumes.add(host_path)
else:
log.warning(
f'Path {host_path} does not exist on this host or it has already been mounted.'
' Skipping this bindings.',
f'Path {host_path} has already been mounted. Skipping this binding.',
)
return env

Expand Down
1 change: 0 additions & 1 deletion tests/spark_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,6 @@ def _get_k8s_base_volumes(self):
"""Helper needed to allow tests to pass in github CI checks."""
return [
volume for volume in spark_config.K8S_BASE_VOLUMES
if os.path.exists(volume['containerPath'])
]

@pytest.fixture
Expand Down