Skip to content
Draft
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
119 changes: 119 additions & 0 deletions docs/design/gui-show-hidden-parameters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Design: `--show-hidden-parameters` for GUI Job Submission

## Problem

Open Job Description templates can mark parameters with `userInterface.control: HIDDEN` to
exclude them from the submission UI. This is useful for parameters that are set programmatically,
have fixed values, or are generally not changed by users. However, during development and debugging,
there is no way to inspect or override these values through the GUI — you have to edit `parameter_values.yaml`
by hand and re-submit from the CLI.

## Solution

Add a `--show-hidden-parameters` flag to `deadline bundle gui-submit`. When set, every `HIDDEN` parameter
is rendered with the default widget for its type instead of being invisible. Users can see the
current value, modify it, and submit with the override — all within the normal GUI workflow.

```bash
deadline bundle gui-submit --show-hidden-parameters /path/to/bundle
```

Without the flag, behavior is unchanged.

## How It Works

### Data flow

The flag threads through the system as a boolean:

```
CLI (--show-hidden-parameters)
→ show_job_bundle_submitter(show_hidden_parameters=...)
→ JobBundleSettings.show_hidden_parameters
→ SubmitJobToDeadlineDialog(show_hidden_parameters=...)
├─ SharedJobSettingsWidget(show_hidden_parameters=...) # queue environment parameters
│ └─ OpenJDParametersWidget(show_hidden_parameters=...)
└─ JobBundleSettingsWidget(initial_settings) # job bundle parameters
└─ OpenJDParametersWidget(show_hidden_parameters=...)
```

Both the job bundle parameters tab and the shared (queue environment) parameters tab receive
the flag, so hidden parameters from any source are revealed.

### Widget resolution

The core logic lives in `OpenJDParametersWidget.rebuild_ui`. For each parameter:

1. Resolve the control type via `get_ui_control_for_parameter_definition(parameter)`.
2. If the result is `HIDDEN` and `show_hidden_parameters` is true, create a shallow copy of the parameter
dict without `userInterface` and re-resolve. This produces the default widget for the
parameter's type (e.g. `LINE_EDIT` for `STRING`, `SPIN_BOX` for `INT`).
3. Construct the widget with the **original** parameter dict so that all constraints
(`allowedValues`, `minValue`, `maxValue`, `decimals`, etc.) are preserved.
4. Mark the widget with an info icon (ℹ️) so the user can tell it is normally hidden.

The widget mapping when revealed:

| Parameter type | Has `allowedValues`? | Widget |
|---|---|---|
| `STRING` | No | `LINE_EDIT` |
| `INT` | No | `SPIN_BOX` (integer) |
| `FLOAT` | No | `SPIN_BOX` (float) |
| `PATH` (directory) | No | `CHOOSE_DIRECTORY` |
| `PATH` (file, input) | No | `CHOOSE_INPUT_FILE` |
| `PATH` (file, output) | No | `CHOOSE_OUTPUT_FILE` |
| Any type | Yes | `DROPDOWN_LIST` |

Note: controls that require an explicit `userInterface.control` hint (like `MULTILINE_EDIT` or
`CHECK_BOX`) cannot be inferred. A revealed hidden `STRING` always becomes `LINE_EDIT`, not
`MULTILINE_EDIT`, because the `HIDDEN` control replaced whatever the author might have intended.

### Visual indicator

Revealed hidden parameters display a small ℹ️ icon before the label. The icon has:
- A **tooltip** ("This parameter is normally hidden") for sighted users on hover.
- An **accessibleDescription** with the same text, announced by screen readers.

This ensures the distinction is conveyed through both visual and non-visual channels.

### Loading a different bundle

When the user clicks "Load Bundle" to switch to a different job bundle, `on_load_bundle`
creates a fresh `JobBundleSettings` and propagates `show_hidden_parameters` from the widget's stored
state. This ensures the flag survives bundle switches within the same dialog session.

### Queue environment parameters

`--show-hidden-parameters` intentionally applies to queue environment parameters, not just job bundle
parameters. During debugging, users need visibility into all parameters regardless of source.

### Third-party submitters

`SubmitJobToDeadlineDialog` accepts `show_hidden_parameters` as an optional keyword argument (default
`False`). DCC submitters (Maya, Blender, etc.) that instantiate the dialog directly can opt in
by passing `show_hidden_parameters=True`. No existing callers are affected.

## Files Changed

| File | Change |
|------|--------|
| `cli/_groups/bundle_group.py` | `--show-hidden-parameters` click option |
| `ui/dataclasses/__init__.py` | `show_hidden_parameters` field on `JobBundleSettings` |
| `ui/job_bundle_submitter.py` | Threads flag to dialog |
| `ui/dialogs/submit_job_to_deadline_dialog.py` | Stores and passes flag to tab widgets |
| `ui/widgets/shared_job_settings_tab.py` | Passes flag to queue `OpenJDParametersWidget` |
| `ui/widgets/job_bundle_settings_tab.py` | Passes flag to bundle `OpenJDParametersWidget`; propagates on bundle load |
| `ui/widgets/openjd_parameters_widget.py` | Core logic: widget resolution, info icon indicator |

## Testing

Tests: `test/unit/deadline_client/ui/widgets/test_show_hidden_parameters.py`
Test data: `test/unit/deadline_client/ui/test_data/job_bundle_with_hidden_params/`

| Test | What it verifies |
|------|-----------------|
| `test_hidden_params_not_visible_by_default` | `HIDDEN` parameters use `_JobTemplateHiddenWidget` and are not in the layout |
| `test_show_hidden_makes_hidden_params_visible` | Each type maps to the correct widget, is in the layout, and has its default value |
| `test_get_parameters_round_trip_with_show_hidden` | `get_parameters()` returns correct values after modifying revealed hidden params |
| `test_show_hidden_with_queue_environment_parameters` | Queue environment hidden params are revealed the same way |
| `test_show_hidden_adds_indicator_icon` | Info icon present on revealed params with correct `accessibleDescription`; absent on normal params |
7 changes: 7 additions & 0 deletions src/deadline/client/cli/_groups/bundle_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,11 @@ def _check_create_job_wait_canceled() -> bool:
'OR --submitter-info \'{"submitter_name": "MyApp", "additional_info": {"render_engine": "Cycles"}}\' '
"OR --submitter-info file://path/to/submitter.json",
)
@click.option(
"--show-hidden-parameters",
is_flag=True,
help="Reveal parameters that are normally hidden from the submission UI, allowing inspection and modification of their values.",
)
@_handle_error
def bundle_gui_submit(
parameter,
Expand All @@ -428,6 +433,7 @@ def bundle_gui_submit(
known_asset_path,
submitter_name,
submitter_info,
show_hidden_parameters,
**args,
):
"""
Expand Down Expand Up @@ -473,6 +479,7 @@ def bundle_gui_submit(
submitter_info=submitter_info,
known_asset_paths=known_asset_path,
job_parameters=parameter,
show_hidden_parameters=show_hidden_parameters,
)

if not submitter:
Expand Down
3 changes: 3 additions & 0 deletions src/deadline/client/ui/dataclasses/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ class JobBundleSettings: # pylint: disable=too-many-instance-attributes
# Whether to allow ability to "Load a different job bundle"
browse_enabled: bool = field(default=False)

# Whether to show HIDDEN parameters in the UI
show_hidden_parameters: bool = field(default=False)


@dataclass
class CliJobSettings: # pylint: disable=too-many-instance-attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def __init__(
host_requirements: Optional[HostRequirements] = None,
submitter_info: Optional[SubmitterInfo] = None,
known_asset_paths: Optional[list[str]] = None,
show_hidden_parameters: bool = False,
):
# The Qt.Tool flag makes sure our widget stays in front of the main application window
super().__init__(parent=parent, f=f)
Expand Down Expand Up @@ -150,6 +151,7 @@ def __init__(
self.show_host_requirements_tab = show_host_requirements_tab
self.known_asset_paths = known_asset_paths or []
self.should_close = False
self._show_hidden_parameters = show_hidden_parameters

self._build_ui(
job_setup_widget_type,
Expand Down Expand Up @@ -318,6 +320,7 @@ def _build_shared_job_settings_tab(self, initial_job_settings, initial_shared_pa
self.shared_job_settings = SharedJobSettingsWidget(
initial_settings=initial_job_settings,
initial_shared_parameter_values=initial_shared_parameter_values,
show_hidden_parameters=self._show_hidden_parameters,
parent=self,
)
self.shared_job_settings.parameter_changed.connect(self.on_shared_job_parameter_changed)
Expand Down
3 changes: 3 additions & 0 deletions src/deadline/client/ui/job_bundle_submitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def show_job_bundle_submitter(
submitter_info: Optional[SubmitterInfo] = None,
known_asset_paths: Optional[list[str]] = None,
job_parameters: Optional[list[dict[str, Any]]] = None,
show_hidden_parameters: bool = False,
) -> Optional[SubmitJobToDeadlineDialog]:
"""
Opens an AWS Deadline Cloud job submission dialog for the provided job bundle.
Expand Down Expand Up @@ -264,6 +265,7 @@ def on_create_job_bundle_callback(
initial_settings = JobBundleSettings(input_job_bundle_dir=input_job_bundle_dir, name=name)
initial_settings.parameters = read_job_bundle_parameters(input_job_bundle_dir)
initial_settings.browse_enabled = browse
initial_settings.show_hidden_parameters = show_hidden_parameters

initial_shared_parameter_values = {}

Expand Down Expand Up @@ -305,6 +307,7 @@ def on_create_job_bundle_callback(
f=f,
submitter_info=submitter_info,
known_asset_paths=known_asset_paths,
show_hidden_parameters=show_hidden_parameters,
)

if job_parameters:
Expand Down
3 changes: 2 additions & 1 deletion src/deadline/client/ui/translations/locales/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"There is a configuration issue with the profile '{profile}'.\n\nTo resolve this issue:\n\u2022 Verify your AWS config and credentials files are correct\n \u2022 By default these files can be found in ~/.aws on Linux/MacOS or %USERPROFILE%/.aws on Windows\n\u2022 Verify that the correct AWS region is set\n \u2022 Check that no environment variables like AWS_DEFAULT_REGION are set to an incorrect region\n\u2022 If you are not using a Deadline Cloud Monitor profile:\n \u2022 Verify that any credential process being used is able to retrieve the credentials or that they aren't expired\n \u2022 You can run the following command to check: aws sts get-caller-identity --profile <PROFILE_NAME>": "Es gibt ein Konfigurationsproblem mit dem Profil '{profile}'.\n\nSo beheben Sie dieses Problem:\n\\u2022 Überprüfen Sie, ob Ihre AWS-Konfigurations- und Anmeldeinformationsdateien korrekt sind\n \\u2022 Standardmäßig befinden sich diese Dateien unter ~/.aws unter Linux/MacOS oder %USERPROFILE%/.aws unter Windows\n\\u2022 Überprüfen Sie, ob die richtige AWS-Region festgelegt ist\n \\u2022 Stellen Sie sicher, dass keine Umgebungsvariablen wie AWS_DEFAULT_REGION auf eine falsche Region gesetzt sind\n\\u2022 Wenn Sie kein Deadline Cloud Monitor-Profil verwenden:\n \\u2022 Überprüfen Sie, ob der verwendete Anmeldeinformationsprozess die Anmeldeinformationen abrufen kann oder ob diese nicht abgelaufen sind\n \\u2022 Sie können den folgenden Befehl ausführen, um dies zu überprüfen: aws sts get-caller-identity --profile <PROFILE_NAME>",
"There was an error with authentication": "Es ist ein Fehler bei der Authentifizierung aufgetreten",
"There was an unknown issue when trying to authenticate with the profile '{profile}'.\n\nCheck any available console logs for errors to try and diagnose the problem.\nLogs are commonly found:\n \u2022 In the terminal that the dialog or software the submitter is running in was launched from \u2022 In the built-in console within the software that the submitter is running in": "Beim Versuch, sich mit dem Profil '{profile}' zu authentifizieren, ist ein unbekanntes Problem aufgetreten.\n\nÜberprüfen Sie verfügbare Konsolenprotokolle auf Fehler, um das Problem zu diagnostizieren.\nProtokolle finden Sie normalerweise:\n \\u2022 Im Terminal, von dem aus der Dialog oder die Software, in der der Submitter ausgeführt wird, gestartet wurde \\u2022 In der integrierten Konsole innerhalb der Software, in der der Submitter ausgeführt wird",
"This parameter is normally hidden": "Dieser Parameter ist normalerweise ausgeblendet",
"Timeouts": "Timeouts",
"Unable to Call AWS Deadline Cloud API": "AWS Deadline Cloud-API kann nicht aufgerufen werden",
"Unknown Issue With Configured Profile": "Unbekanntes Problem mit konfiguriertem Profil",
Expand All @@ -132,4 +133,4 @@
"{profile} - You are logged out.": "{profile} - Sie sind abgemeldet.",
"{profile} doesn't have access permissions to submit a job.": "{profile} hat keine Zugriffsberechtigungen zum Übermitteln eines Jobs.",
"{submitter} job submission": "{submitter}-Jobübermittlung"
}
}
3 changes: 2 additions & 1 deletion src/deadline/client/ui/translations/locales/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"There is a configuration issue with the profile '{profile}'.\n\nTo resolve this issue:\n\u2022 Verify your AWS config and credentials files are correct\n \u2022 By default these files can be found in ~/.aws on Linux/MacOS or %USERPROFILE%/.aws on Windows\n\u2022 Verify that the correct AWS region is set\n \u2022 Check that no environment variables like AWS_DEFAULT_REGION are set to an incorrect region\n\u2022 If you are not using a Deadline Cloud Monitor profile:\n \u2022 Verify that any credential process being used is able to retrieve the credentials or that they aren't expired\n \u2022 You can run the following command to check: aws sts get-caller-identity --profile <PROFILE_NAME>": "There is a configuration issue with the profile '{profile}'.\n\nTo resolve this issue:\n\\u2022 Verify your AWS config and credentials files are correct\n \\u2022 By default these files can be found in ~/.aws on Linux/MacOS or %USERPROFILE%/.aws on Windows\n\\u2022 Verify that the correct AWS region is set\n \\u2022 Check that no environment variables like AWS_DEFAULT_REGION are set to an incorrect region\n\\u2022 If you are not using a Deadline Cloud Monitor profile:\n \\u2022 Verify that any credential process being used is able to retrieve the credentials or that they aren't expired\n \\u2022 You can run the following command to check: aws sts get-caller-identity --profile <PROFILE_NAME>",
"There was an error with authentication": "There was an error with authentication",
"There was an unknown issue when trying to authenticate with the profile '{profile}'.\n\nCheck any available console logs for errors to try and diagnose the problem.\nLogs are commonly found:\n \u2022 In the terminal that the dialog or software the submitter is running in was launched from \u2022 In the built-in console within the software that the submitter is running in": "There was an unknown issue when trying to authenticate with the profile '{profile}'.\n\nCheck any available console logs for errors to try and diagnose the problem.\nLogs are commonly found:\n \\u2022 In the terminal that the dialog or software the submitter is running in was launched from \\u2022 In the built-in console within the software that the submitter is running in",
"This parameter is normally hidden": "This parameter is normally hidden",
"Timeouts": "Timeouts",
"Unable to Call AWS Deadline Cloud API": "Unable to Call AWS Deadline Cloud API",
"Unknown Issue With Configured Profile": "Unknown Issue With Configured Profile",
Expand All @@ -132,4 +133,4 @@
"{profile} - You are logged out.": "{profile} - You are logged out.",
"{profile} doesn't have access permissions to submit a job.": "{profile} doesn't have access permissions to submit a job.",
"{submitter} job submission": "{submitter} job submission"
}
}
3 changes: 2 additions & 1 deletion src/deadline/client/ui/translations/locales/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"There is a configuration issue with the profile '{profile}'.\n\nTo resolve this issue:\n\u2022 Verify your AWS config and credentials files are correct\n \u2022 By default these files can be found in ~/.aws on Linux/MacOS or %USERPROFILE%/.aws on Windows\n\u2022 Verify that the correct AWS region is set\n \u2022 Check that no environment variables like AWS_DEFAULT_REGION are set to an incorrect region\n\u2022 If you are not using a Deadline Cloud Monitor profile:\n \u2022 Verify that any credential process being used is able to retrieve the credentials or that they aren't expired\n \u2022 You can run the following command to check: aws sts get-caller-identity --profile <PROFILE_NAME>": "Hay un problema de configuración con el perfil '{profile}'.\n\nPara resolver este problema:\n\\u2022 Verifique que sus archivos de configuración y credenciales de AWS sean correctos\n \\u2022 De forma predeterminada, estos archivos se encuentran en ~/.aws en Linux/MacOS o %USERPROFILE%/.aws en Windows\n\\u2022 Verifique que esté configurada la región de AWS correcta\n \\u2022 Compruebe que no haya variables de entorno como AWS_DEFAULT_REGION configuradas en una región incorrecta\n\\u2022 Si no está utilizando un perfil de Deadline Cloud Monitor:\n \\u2022 Verifique que cualquier proceso de credenciales que se esté utilizando pueda recuperar las credenciales o que no hayan caducado\n \\u2022 Puede ejecutar el siguiente comando para comprobarlo: aws sts get-caller-identity --profile <PROFILE_NAME>",
"There was an error with authentication": "Se produjo un error con la autenticación",
"There was an unknown issue when trying to authenticate with the profile '{profile}'.\n\nCheck any available console logs for errors to try and diagnose the problem.\nLogs are commonly found:\n \u2022 In the terminal that the dialog or software the submitter is running in was launched from \u2022 In the built-in console within the software that the submitter is running in": "Se produjo un problema desconocido al intentar autenticarse con el perfil '{profile}'.\n\nCompruebe los registros de consola disponibles en busca de errores para intentar diagnosticar el problema.\nLos registros se encuentran comúnmente:\n \\u2022 En el terminal desde el que se inició el cuadro de diálogo o el software en el que se ejecuta el remitente \\u2022 En la consola integrada dentro del software en el que se ejecuta el remitente",
"This parameter is normally hidden": "Este parámetro está normalmente oculto",
"Timeouts": "Tiempos de espera",
"Unable to Call AWS Deadline Cloud API": "No se puede llamar a la API de AWS Deadline Cloud",
"Unknown Issue With Configured Profile": "Problema desconocido con el perfil configurado",
Expand All @@ -132,4 +133,4 @@
"{profile} - You are logged out.": "{profile} - Ha cerrado sesión.",
"{profile} doesn't have access permissions to submit a job.": "{profile} no tiene permisos de acceso para enviar un trabajo.",
"{submitter} job submission": "Envío de trabajo de {submitter}"
}
}
Loading
Loading