Skip to content

Commit 0e4bcb8

Browse files
authored
fix: bump wrapper library to get support for volumes in Job class (#590)
Signed-off-by: lugi0 <lgiorgi@redhat.com>
1 parent 491db86 commit 0e4bcb8

File tree

3 files changed

+765
-781
lines changed

3 files changed

+765
-781
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ dependencies = [
6262
"timeout-sampler>=1.0.6",
6363
"shortuuid>=1.0.13",
6464
"jira>=3.8.0",
65-
"openshift-python-wrapper>=11.0.57",
65+
"openshift-python-wrapper>=11.0.92",
6666
"semver>=3.0.4",
6767
"sqlalchemy>=2.0.40",
6868
"pytest-order>=1.3.0",

tests/model_registry/async_job/conftest.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,6 @@
3737
from utilities.general import get_s3_secret_dict
3838

3939

40-
# We need to upstream this to the wrapper library
41-
class JobWithVolumes(Job):
42-
"""Extended Job class that supports volumes"""
43-
44-
def __init__(self, volumes=None, **kwargs):
45-
super().__init__(**kwargs)
46-
self.volumes = volumes or []
47-
48-
def to_dict(self) -> None:
49-
super().to_dict()
50-
if not self.kind_dict and not self.yaml_file and self.volumes:
51-
self.res["spec"].setdefault("template", {}).setdefault("spec", {})
52-
self.res["spec"]["template"]["spec"]["volumes"] = self.volumes
53-
54-
5540
@pytest.fixture(scope="class")
5641
def s3_secret_for_async_job(
5742
admin_client: DynamicClient,
@@ -215,7 +200,7 @@ def model_sync_async_job(
215200
},
216201
]
217202

218-
with JobWithVolumes(
203+
with Job(
219204
client=admin_client,
220205
name=ASYNC_UPLOAD_JOB_NAME,
221206
namespace=service_account.namespace,

0 commit comments

Comments
 (0)