Skip to content

Commit

Permalink
fix name of constant
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoLisin committed Nov 20, 2023
1 parent dac2c02 commit 27204ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion agent/worker/task_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,6 @@ def _exec_command(self, command, add_envs=None, container_id=None):
"SERVER_ADDRESS": self.info["server_address"],
"API_TOKEN": self.info["api_token"],
"AGENT_TOKEN": constants.TOKEN(),
constants._REQUESTS_CA_BUNDLE: constants.REQUESTS_CA_BUNDLE_CONTAINER(),
"PIP_ROOT_USER_ACTION": "ignore",
**add_envs,
},
Expand Down Expand Up @@ -684,6 +683,9 @@ def main_step_envs(self):
if constants.SUPERVISELY_AGENT_FILES() is not None:
envs["AGENT_STORAGE"] = constants.AGENT_FILES_IN_APP_CONTAINER()

if constants.REQUESTS_CA_BUNDLE() is not None:
envs[constants._REQUESTS_CA_BUNDLE] = constants.REQUESTS_CA_BUNDLE_CONTAINER()

# Handle case for some dockerimages where env names with dot sumbol are not supported
final_envs = copy.deepcopy(envs)
for k, v in envs.items():
Expand Down
3 changes: 1 addition & 2 deletions agent/worker/task_dockerized.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def main_step_envs(self):
envs[env_key] = env_val

if constants.REQUESTS_CA_BUNDLE() is not None:
envs["REQUESTS_CA_BUNDLE"] = constants.REQUESTS_CA_BUNDLE_IN_CONTAINER()
envs[constants._REQUESTS_CA_BUNDLE] = constants.REQUESTS_CA_BUNDLE_CONTAINER()

return envs

Expand Down Expand Up @@ -199,7 +199,6 @@ def spawn_container(self, add_envs=None, add_labels=None, entrypoint_func=None):
constants._HTTP_PROXY.lower(): constants.HTTP_PROXY(),
constants._HTTPS_PROXY.lower(): constants.HTTPS_PROXY(),
constants._NO_PROXY.lower(): constants.NO_PROXY(),
constants._REQUESTS_CA_BUNDLE: constants.REQUESTS_CA_BUNDLE_CONTAINER(),
"PIP_ROOT_USER_ACTION": "ignore",
**add_envs,
}
Expand Down

0 comments on commit 27204ac

Please sign in to comment.