Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ASP-4481] Fixed the installation of the agent's addons on its virtual environment #16

Merged
merged 1 commit into from
Aug 15, 2024
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
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This file keeps track of all notable changes to charm-jobbergate-agent.

Unreleased
----------
- Fixed the installation of the agent's addons on its virtual environment [ASP-4481]

1.0.3 - 2024-04-18
------------------
Expand Down
8 changes: 3 additions & 5 deletions src/jobbergate_agent_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
JobbergateAgentOps.
"""
import logging
import shlex
import subprocess
from pathlib import Path
from shutil import copy2, rmtree
Expand Down Expand Up @@ -142,7 +143,7 @@ def _install_extra_deps(self):
"""Install additional dependencies."""
# Install uvicorn and pyyaml
cmd = [self._PIP_CMD, "install", "uvicorn", "pyyaml"]
logger.debug(f"## Installing exra dependencies: {cmd}")
logger.debug(f"## Installing extra dependencies: {cmd}")
try:
subprocess.call(cmd, env=dict())
except subprocess.CalledProcessError as e:
Expand All @@ -157,7 +158,6 @@ def _install_jobbergate_agent(self):
"-U",
self._PACKAGE_NAME,
]
subprocess.call("echo {}".format(cmd).split())
logger.debug(f"## Installing jobbergate: {cmd}")
try:
subprocess.call(cmd, env=dict())
Expand All @@ -171,9 +171,7 @@ def _install_jobbergate_addon(self, addon: str):
self._PIP_CMD,
"install",
"-U",
addon,
]
subprocess.call("echo {}".format(cmd).split())
] + shlex.split(addon)
logger.debug(f"## Installing jobbergate-addons: {cmd}")
try:
subprocess.call(cmd, env=dict())
Expand Down
Loading