-
Notifications
You must be signed in to change notification settings - Fork 67
Description
Describe the bug
The S3AssetManager class which is the public interface for job attachments functionality does not use storage profiles for default.
The S3AssetManager class takes a farm_id, queue_id, and session in its constructor. Then later, the prepare_paths_for_upload method takes storage_profile as an optional parameter. It's not terrible difficult to fetch the storage profile and pass it in, but passing in storage profiles is easy to miss, possible to mess up, and should be done automatically. If S3AssetManager already has the queue ID, it can find the storage profile to use internally and automatically.
| storage_profile: Optional[StorageProfile] = None, |
deadline-cloud/src/deadline/job_attachments/upload.py
Lines 861 to 868 in dc67589
| def __init__( | |
| self, | |
| farm_id: Optional[str] = None, | |
| queue_id: Optional[str] = None, | |
| job_attachment_settings: Optional[JobAttachmentS3Settings] = None, | |
| asset_uploader: Optional[S3AssetUploader] = None, | |
| session: Optional[boto3.Session] = None, | |
| asset_manifest_version: ManifestVersion = ManifestVersion.v2023_03_03, |
More broadly, it'd be nice if there were a single create_job function that wrapped up the job inputs and job attachments together so that consumers of the libraries can simply pass in a list of paths with the job and don't need to know how job attachments, shared storage, and storage profiles all interact.
Expected Behaviour
Job attachments uses a queue's storage profile by default.
Current Behaviour
Job attachments needs to be opted in to using storage profiles.
Reproduction Steps
n/a
Environment
n/a