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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ dependencies = [
"timeout-sampler>=1.0.6",
"shortuuid>=1.0.13",
"jira>=3.8.0",
"openshift-python-wrapper>=11.0.57",
"openshift-python-wrapper>=11.0.92",
"semver>=3.0.4",
"sqlalchemy>=2.0.40",
"pytest-order>=1.3.0",
Expand Down
17 changes: 1 addition & 16 deletions tests/model_registry/async_job/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,6 @@
from utilities.general import get_s3_secret_dict


# We need to upstream this to the wrapper library
class JobWithVolumes(Job):
"""Extended Job class that supports volumes"""

def __init__(self, volumes=None, **kwargs):
super().__init__(**kwargs)
self.volumes = volumes or []

def to_dict(self) -> None:
super().to_dict()
if not self.kind_dict and not self.yaml_file and self.volumes:
self.res["spec"].setdefault("template", {}).setdefault("spec", {})
self.res["spec"]["template"]["spec"]["volumes"] = self.volumes


@pytest.fixture(scope="class")
def s3_secret_for_async_job(
admin_client: DynamicClient,
Expand Down Expand Up @@ -215,7 +200,7 @@ def model_sync_async_job(
},
]

with JobWithVolumes(
with Job(
client=admin_client,
name=ASYNC_UPLOAD_JOB_NAME,
namespace=service_account.namespace,
Expand Down
Loading