From 54f72286c472c5ca82943df64b628d3935d80d6f Mon Sep 17 00:00:00 2001 From: Ramon Montoya Vozmediano <1171039+rmv@users.noreply.github.com> Date: Tue, 7 Nov 2023 07:41:08 -0800 Subject: [PATCH] feat!: pass along JobBundlePurpose in bundle creation callback. Signed-off-by: Ramon Montoya Vozmediano <1171039+rmv@users.noreply.github.com> --- .../ui/dialogs/submit_job_to_deadline_dialog.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/deadline/client/ui/dialogs/submit_job_to_deadline_dialog.py b/src/deadline/client/ui/dialogs/submit_job_to_deadline_dialog.py index 10080ece..6b866a2b 100644 --- a/src/deadline/client/ui/dialogs/submit_job_to_deadline_dialog.py +++ b/src/deadline/client/ui/dialogs/submit_job_to_deadline_dialog.py @@ -39,6 +39,7 @@ from ..widgets.host_requirements_tab import HostRequirementsWidget from . import DeadlineConfigDialog, DeadlineLoginDialog from ...job_bundle.submission import AssetReferences +from ._types import JobBundlePurpose logger = logging.getLogger(__name__) @@ -350,11 +351,17 @@ def on_export_bundle(self): queue_parameters, asset_references, requirements, + purpose=JobBundlePurpose.EXPORT, ) else: # Maintaining backward compatibility for submitters that do not support host_requirements yet self.on_create_job_bundle_callback( - self, job_history_bundle_dir, settings, queue_parameters, asset_references + self, + job_history_bundle_dir, + settings, + queue_parameters, + asset_references, + purpose=JobBundlePurpose.EXPORT, ) logger.info(f"Saved the submission as a job bundle: {job_history_bundle_dir}") @@ -407,11 +414,17 @@ def on_submit(self): queue_parameters, asset_references, requirements, + purpose=JobBundlePurpose.SUBMISSION, ) else: # Maintaining backward compatibility for submitters that do not support host_requirements yet self.on_create_job_bundle_callback( - self, job_history_bundle_dir, settings, queue_parameters, asset_references + self, + job_history_bundle_dir, + settings, + queue_parameters, + asset_references, + purpose=JobBundlePurpose.SUBMISSION, ) farm_id = get_setting("defaults.farm_id")