Skip to content

Commit

Permalink
Revert "fix: Install boto3 CRT extra feature always (aws-deadline#328)"
Browse files Browse the repository at this point in the history
This reverts commit dffc71e.

Revert "feat: use AWS CRT for faster transfers (aws-deadline#319)"
This reverts commit 52da0ea.
  • Loading branch information
leongdl committed May 27, 2024
1 parent 041550c commit 3ec6cea
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 26 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ classifiers = [
# Applications that consume this library should be the ones that are more strictly
# limiting dependencies if they want/need to.
dependencies = [
"boto3[crt] >= 1.34.75",
"boto3 >= 1.34.75",
"click >= 8.1.7",
"pyyaml >= 6.0",
# Job Attachments
Expand Down
10 changes: 1 addition & 9 deletions src/deadline/job_attachments/_aws/aws_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
from typing import Optional

import boto3
from boto3.s3.transfer import create_crt_transfer_manager, create_transfer_manager

import botocore
from boto3.s3.transfer import create_transfer_manager
from botocore.client import BaseClient, Config

from deadline.client.config import config_file
Expand Down Expand Up @@ -105,13 +104,6 @@ def get_s3_max_pool_connections() -> int:
@lru_cache(maxsize=MAX_SIZE_CACHE)
def get_s3_transfer_manager(s3_client: BaseClient):
transfer_config = boto3.s3.transfer.TransferConfig()

crt_transfer_manager = create_crt_transfer_manager(client=s3_client, config=transfer_config)
if crt_transfer_manager:
return crt_transfer_manager

# Fallback to regular transfer manager if CRT transfer manager does not support the configuration, which can happen if the client
# and bucket are in different regions.
return create_transfer_manager(client=s3_client, config=transfer_config)


Expand Down
4 changes: 0 additions & 4 deletions test/unit/deadline_job_attachments/test_asset_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@
from ..conftest import is_windows_non_admin


@patch(
f"{deadline.__package__}.job_attachments._aws.aws_clients.create_crt_transfer_manager",
MagicMock(return_value=None),
)
class TestAssetSync:
@pytest.fixture(autouse=True)
def before_test(
Expand Down
8 changes: 0 additions & 8 deletions test/unit/deadline_job_attachments/test_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,10 +566,6 @@ def assert_get_job_input_output_paths_by_asset_root(

@pytest.mark.docker
@pytest.mark.parametrize("manifest_version", [ManifestVersion.v2023_03_03])
@patch(
f"{deadline.__package__}.job_attachments._aws.aws_clients.create_crt_transfer_manager",
MagicMock(return_value=None),
)
class TestFullDownload:
"""
Tests for downloads from cas.
Expand Down Expand Up @@ -1969,10 +1965,6 @@ def test_download_file_error_message_on_timeout(self):


@pytest.mark.parametrize("manifest_version", [ManifestVersion.v2023_03_03])
@patch(
f"{deadline.__package__}.job_attachments._aws.aws_clients.create_crt_transfer_manager",
MagicMock(return_value=None),
)
class TestFullDownloadPrefixesWithSlashes:
"""
Tests for downloads from cas when the queue prefixes are created.
Expand Down
4 changes: 0 additions & 4 deletions test/unit/deadline_job_attachments/test_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@
from ..conftest import is_windows_non_admin


@patch(
f"{deadline.__package__}.job_attachments._aws.aws_clients.create_crt_transfer_manager",
MagicMock(return_value=None),
)
class TestUpload:
"""
Tests for handling uploading assets.
Expand Down

0 comments on commit 3ec6cea

Please sign in to comment.