Skip to content

Commit

Permalink
add security skips on worker_helpers
Browse files Browse the repository at this point in the history
Co-authored-by: Sameer Wagh <[email protected]>
  • Loading branch information
BrendanSchell committed Sep 18, 2024
1 parent 2a6009e commit 3efb250
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/syft/src/syft/util/test_helpers/worker_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ def build_and_launch_worker_pool_from_docker_str(
scale_to: int,
):
result = client.api.services.image_registry.add(external_registry)
assert "success" in result.message
assert "success" in result.message # nosec: B101

# For some reason, when using k9s, result.value is empty so can't use the below line
# local_registry = result.value
local_registry = client.api.services.image_registry[0]

docker_config = sy.DockerWorkerConfig(dockerfile=worker_dockerfile)
assert docker_config.dockerfile == worker_dockerfile
assert docker_config.dockerfile == worker_dockerfile # nosec: B101
submit_result = client.api.services.worker_image.submit(worker_config=docker_config)
print(submit_result.message)
assert "success" in submit_result.message
assert "success" in submit_result.message # nosec: B101

worker_image = submit_result.value

Expand Down Expand Up @@ -66,10 +66,10 @@ def launch_worker_pool_from_docker_tag_and_registry(
scale_to: int = 1,
):
res = client.api.services.image_registry.add(external_registry)
assert "success" in res.message
assert "success" in res.message # nosec: B101
docker_config = sy.PrebuiltWorkerConfig(tag=docker_tag)
image_result = client.api.services.worker_image.submit(worker_config=docker_config)
assert "success" in res.message
assert "success" in res.message # nosec: B101
worker_image = image_result.value

launch_result = client.api.services.worker_pool.launch(
Expand All @@ -83,4 +83,4 @@ def launch_worker_pool_from_docker_tag_and_registry(
result = client.worker_pools.scale(number=scale_to, pool_name=worker_pool_name)
print(result)

return launch_result
return launch_result

0 comments on commit 3efb250

Please sign in to comment.