From bf746f2b28861922f54cb0fd83e1329785785dd0 Mon Sep 17 00:00:00 2001 From: Gahyun Suh <132245153+gahyusuh@users.noreply.github.com> Date: Tue, 12 Sep 2023 17:01:51 -0500 Subject: [PATCH] chore: upgrade deadline-cloud version to 0.23.* (#25) Signed-off-by: Gahyun Suh --- pyproject.toml | 2 +- .../sessions/actions/sync_input_job_attachments.py | 2 +- .../sessions/job_entities/job_attachment_details.py | 2 +- src/deadline_worker_agent/sessions/session.py | 2 +- test/unit/conftest.py | 2 +- test/unit/scheduler/test_session_queue.py | 2 +- .../sessions/actions/test_sync_input_job_attachments.py | 8 ++++---- test/unit/sessions/test_job_attachment_details.py | 2 +- test/unit/sessions/test_job_entities.py | 2 +- test/unit/sessions/test_session.py | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 70bfb570..31fd0837 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ dynamic = ["version"] dependencies = [ "requests ~= 2.29", "boto3 ~= 1.26", - "deadline == 0.18.*", + "deadline == 0.23.*", "openjd == 0.10.*", # tomli became tomllib in standard library in Python 3.11 "tomli >= 1.1.0 ; python_version<'3.11'", diff --git a/src/deadline_worker_agent/sessions/actions/sync_input_job_attachments.py b/src/deadline_worker_agent/sessions/actions/sync_input_job_attachments.py index b04bc38f..c3f52452 100644 --- a/src/deadline_worker_agent/sessions/actions/sync_input_job_attachments.py +++ b/src/deadline_worker_agent/sessions/actions/sync_input_job_attachments.py @@ -12,7 +12,7 @@ from threading import Event from typing import Any, TYPE_CHECKING, Optional -from deadline.job_attachments.errors import AssetSyncCancelledError +from deadline.job_attachments.exceptions import AssetSyncCancelledError from openjd.sessions import ActionState, ActionStatus from ..session import Session diff --git a/src/deadline_worker_agent/sessions/job_entities/job_attachment_details.py b/src/deadline_worker_agent/sessions/job_entities/job_attachment_details.py index 9bacc876..86ac8eac 100644 --- a/src/deadline_worker_agent/sessions/job_entities/job_attachment_details.py +++ b/src/deadline_worker_agent/sessions/job_entities/job_attachment_details.py @@ -5,7 +5,7 @@ from typing import Any, cast from openjd.sessions import Parameter, ParameterType -from deadline.job_attachments.utils import AssetLoadingMethod +from deadline.job_attachments._utils import AssetLoadingMethod from ...api_models import ( FloatParameter, diff --git a/src/deadline_worker_agent/sessions/session.py b/src/deadline_worker_agent/sessions/session.py index da943cbe..683f5472 100644 --- a/src/deadline_worker_agent/sessions/session.py +++ b/src/deadline_worker_agent/sessions/session.py @@ -58,7 +58,7 @@ Attachments, ) from deadline.job_attachments.progress_tracker import ProgressReportMetadata -from deadline.job_attachments.utils import OperatingSystemFamily +from deadline.job_attachments._utils import OperatingSystemFamily from ..scheduler.session_action_status import SessionActionStatus from ..sessions.errors import SessionActionError diff --git a/test/unit/conftest.py b/test/unit/conftest.py index 27d3be35..b619ace2 100644 --- a/test/unit/conftest.py +++ b/test/unit/conftest.py @@ -10,7 +10,7 @@ from typing import Generator, Optional from deadline.job_attachments.models import ManifestProperties, Attachments -from deadline.job_attachments.utils import AssetLoadingMethod, OperatingSystemFamily +from deadline.job_attachments._utils import AssetLoadingMethod, OperatingSystemFamily from openjd.model import SchemaVersion from openjd.sessions import ( Parameter, diff --git a/test/unit/scheduler/test_session_queue.py b/test/unit/scheduler/test_session_queue.py index 0b319002..e3fd8bab 100644 --- a/test/unit/scheduler/test_session_queue.py +++ b/test/unit/scheduler/test_session_queue.py @@ -5,7 +5,7 @@ from unittest.mock import MagicMock, Mock, patch from collections import OrderedDict -from deadline.job_attachments.utils import AssetLoadingMethod +from deadline.job_attachments._utils import AssetLoadingMethod from openjd.model import SchemaVersion, UnsupportedSchema from openjd.model.v2023_09 import ( Environment, diff --git a/test/unit/sessions/actions/test_sync_input_job_attachments.py b/test/unit/sessions/actions/test_sync_input_job_attachments.py index b6f5dce7..ba39624a 100644 --- a/test/unit/sessions/actions/test_sync_input_job_attachments.py +++ b/test/unit/sessions/actions/test_sync_input_job_attachments.py @@ -5,7 +5,7 @@ from typing import Callable, TYPE_CHECKING from unittest.mock import Mock, patch -from deadline.job_attachments.errors import AssetSyncCancelledError +from deadline.job_attachments.exceptions import AssetSyncCancelledError from openjd.sessions import ActionState, ActionStatus import pytest @@ -207,7 +207,7 @@ def test_handles_success( ), ids=( "concurrent.futures.CancelledError", - "deadline.job_attachments.errors.AssetSyncCancelledError", + "deadline.job_attachments.exceptions.AssetSyncCancelledError", ), ) def test_handles_cancelation( @@ -220,7 +220,7 @@ def test_handles_cancelation( """Tests that when the future raises one of: - concurrent.futures.CancelledError (future was canceled before starting) - - deadline.job_attachments.errors.AssetSyncCancelledError + - deadline.job_attachments.exceptions.AssetSyncCancelledError that Session.update_action() is called with state=ActionState.CANCELED """ @@ -263,7 +263,7 @@ def test_handles_failure( """Tests that when the future raises one of: - concurrent.futures.CancelledError (future was canceled before starting) - - deadline.job_attachments.errors.AssetSyncCancelledError + - deadline.job_attachments.exceptions.AssetSyncCancelledError that Session.update_action() is called with state=ActionState.CANCELED """ diff --git a/test/unit/sessions/test_job_attachment_details.py b/test/unit/sessions/test_job_attachment_details.py index 3143cb80..d3518bfe 100644 --- a/test/unit/sessions/test_job_attachment_details.py +++ b/test/unit/sessions/test_job_attachment_details.py @@ -2,7 +2,7 @@ import pytest -from deadline.job_attachments.utils import AssetLoadingMethod +from deadline.job_attachments._utils import AssetLoadingMethod from deadline_worker_agent.sessions.job_entities.job_attachment_details import JobAttachmentDetails diff --git a/test/unit/sessions/test_job_entities.py b/test/unit/sessions/test_job_entities.py index 66b348ed..485c42f1 100644 --- a/test/unit/sessions/test_job_entities.py +++ b/test/unit/sessions/test_job_entities.py @@ -4,7 +4,7 @@ from typing import Generator from unittest.mock import MagicMock, patch -from deadline.job_attachments.utils import AssetLoadingMethod +from deadline.job_attachments._utils import AssetLoadingMethod from openjd.model import SchemaVersion from openjd.model.v2023_09 import ( Action, diff --git a/test/unit/sessions/test_session.py b/test/unit/sessions/test_session.py index 1c3c92d7..af11f95f 100644 --- a/test/unit/sessions/test_session.py +++ b/test/unit/sessions/test_session.py @@ -44,7 +44,7 @@ StepDetails, ) from deadline.job_attachments.models import Attachments -from deadline.job_attachments.utils import AssetLoadingMethod +from deadline.job_attachments._utils import AssetLoadingMethod import deadline_worker_agent.sessions.session as session_mod