Skip to content

Commit

Permalink
fix(hydra): don't running any python code outside hydra image
Browse files Browse the repository at this point in the history
when doing so we can easily break users depends on which python
version they are using, we shouldn't assume anything about user
env.
  • Loading branch information
fruch committed Jul 30, 2024
1 parent 1cb1c83 commit 3bcd32a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
3 changes: 0 additions & 3 deletions docker/env/hydra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ SCT_DIR=$(dirname "${DOCKER_ENV_DIR}")
SCT_DIR=$(dirname "${SCT_DIR}")
VERSION=v$(cat "${DOCKER_ENV_DIR}/version")
HOST_NAME=SCT-CONTAINER
RUN_BY_USER=$(python3 "${SCT_DIR}/sdcm/utils/get_username.py")
USER_ID=$(id -u "${USER}"):$(id -g "${USER}")
HOME_DIR=${HOME}

Expand Down Expand Up @@ -245,8 +244,6 @@ function run_in_docker () {
$([[ -n "$HYDRA_DRY_RUN" ]] && echo echo) \
$tool ${REMOTE_DOCKER_HOST} run --rm ${TTY_STDIN} --privileged \
-h ${HOST_NAME} \
-l "TestId=${SCT_TEST_ID}" \
-l "RunByUser=${RUN_BY_USER}" \
-v "${SCT_DIR}:${SCT_DIR}" \
-v /tmp:/tmp \
-v /var/tmp:/var/tmp \
Expand Down
1 change: 0 additions & 1 deletion unit_tests/test_hydra_sh.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ def expected(self, runner):
docker_run_prefix = self.docker_run_prefix(runner)
sct_dir = self.sct_path(runner)
expected = (
re.compile(f"{docker_run_prefix} -l TestId=11111111-1111-1111-1111-111111111111"),
re.compile(f"{docker_run_prefix} -v {sct_dir}:{sct_dir} .* -v /var/run:/run"),
re.compile(f"{docker_run_prefix} --group-add 1 --group-add 2 --group-add 3"),
)
Expand Down

0 comments on commit 3bcd32a

Please sign in to comment.