Skip to content
Open
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 @@ -13,7 +13,7 @@ license = "Apache-2.0"
dependencies = [
"requests ~= 2.31",
"boto3 >= 1.34.75",
"deadline >= 0.54.0,< 0.55",
"deadline >= 0.55,< 0.56",
# Pinned to patch version due to Host Config Script runner usage of private OpenJD Sessions API.
"openjd-sessions == 0.10.7",
"openjd-model >= 0.8.1, < 0.10",
Expand Down
9 changes: 9 additions & 0 deletions src/deadline_worker_agent/aws/deadline/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,15 @@ def _record_attachment_download_filesystem_event(queue_id: str, file_system: str
)


def record_vfs_mount_telemetry_event(successfully_mounted: bool) -> None:
"""Calls the telemetry client to record whether a VFS mount succeeded."""
details: Dict[str, Any] = {"successfully_mounted": successfully_mounted}
_get_deadline_telemetry_client().record_event(
event_type="com.amazon.rum.deadline.job_attachments.vfs_mount",
event_details=details,
)


def record_sync_inputs_telemetry_event(queue_id: str, summary: SummaryStatistics) -> None:
"""Calls the telemetry client to record an event capturing the sync-inputs summary."""
details: Dict[str, Any] = asdict(summary)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
WindowsPermissionEnum,
)
from deadline.job_attachments._utils import _get_unique_dest_dir_name
from deadline_worker_agent.aws.deadline import _record_attachment_download_filesystem_event
from deadline_worker_agent.aws.deadline import (
_record_attachment_download_filesystem_event,
record_vfs_mount_telemetry_event,
)

from openjd.sessions import (
LOG as OPENJD_LOG,
Expand Down Expand Up @@ -425,6 +428,7 @@ def _start_vfs(
fs_permission_settings=fs_permission_settings,
merged_manifests_by_root=merged_manifests_by_root,
os_env_vars=dict(session._env), # type: ignore
on_mount_complete=record_vfs_mount_telemetry_event,
)
else:
return False
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@

_queue_id = os.environ.get("DEADLINE_QUEUE_ID", "queue-unknown") # Just for telemetry

# Configuration constants for the S3AssetUploader used during output uploads.
S3_MAX_POOL_CONNECTIONS = 50
SMALL_FILE_THRESHOLD_MULTIPLIER = 20
Comment on lines +53 to +54
Copy link
Copy Markdown
Contributor

@epmog epmog Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So previously this would use deadline's config, though this is on a worker agent, so it probably wasn't set and would use the default. Is this something we should add a configuration option for? Can potentially punt for now, but it is worth thinking about.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just deadline's config default, we decided to keep it as a enum here and we can revisit later if we need a config or not, it's a 2 ways door and I prefer not overcomplicated for now with just 2 values.


F = TypeVar("F", bound=Callable[..., Any])


Expand Down Expand Up @@ -288,7 +292,10 @@ def upload_output_assets(
s3_settings = JobAttachmentS3Settings.from_s3_root_uri(s3_uri)

# Initialize the S3 asset uploader
asset_uploader: S3AssetUploader = S3AssetUploader()
asset_uploader: S3AssetUploader = S3AssetUploader(
s3_max_pool_connections=S3_MAX_POOL_CONNECTIONS,
small_file_threshold_multiplier=SMALL_FILE_THRESHOLD_MULTIPLIER,
)
output_manifest_info_list = []

all_upload_summaries = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ def test_failure_telemetry_decorator_on_upload_output_assets(
},
) # Mock the environment variables
@patch.object(attachment_upload_mod, "record_attachment_upload_latencies_telemetry_event")
@patch.object(attachment_upload_mod, "upload_output_assets")
@patch.object(attachment_upload_mod, "snapshot")
@patch.object(attachment_upload_mod, "merge")
@patch.object(attachment_upload_mod, "parse_worker_manifest_properties")
Expand All @@ -654,6 +655,7 @@ def test_latencies_telemetry(
mock_parse: Mock,
mock_merge: Mock,
mock_snapshot: Mock,
mock_upload: Mock,
mock_latencies_telemetry: Mock,
root_path_to_output_manifest: Optional[Mock],
):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ def test_start_vfs_calling_asset_sync(
fs_permission_settings=ANY,
merged_manifests_by_root=merged_manifests_by_root,
os_env_vars=session._env,
on_mount_complete=ANY,
)

def test_start_vfs_windows_platform(
Expand Down
Loading