Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Hidden parameters incorrectly require a default value #343

Open
crowecawcaw opened this issue Jun 6, 2024 · 0 comments
Open

Bug: Hidden parameters incorrectly require a default value #343

crowecawcaw opened this issue Jun 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@crowecawcaw
Copy link
Contributor

Expected Behaviour

An OpenJobDescription template that has a input with a HIDDEN control type does not require a default value.

My use case: I want to create a job bundle that has parameters including an input file in parameter_values.json and a job template that takes an input file as a parameter. I want to use the GUI submitter to submit the bundle, but the input file should be set in parameter_values.json and not displayed as an editable field to the user.

The OJD spec does not mention requiring a default for hidden fields.

Current Behaviour

Attempting to submit a template with a HIDDEN control but without a default value with the bundle GUI submitter results in the error:

https://github.com/aws-deadline/deadline-cloud/blob/4d48772538898d21a36ac62f68d5670dcac1c36b/src/deadline/client/ui/widgets/openjd_parameters_widget.py#L797

Reproduction Steps

Snipped of a job template (taken from the Deadline Keyshot submitter):

{
    "specificationVersion": "jobtemplate-2023-09",
    "name": "my job",
    "parameterDefinitions": [
        {
            "name": "KeyShotFile",
            "type": "PATH",
            "objectType": "FILE",
            "dataFlow": "IN",
            "userInterface": {
                "control": "HIDDEN",
                "label": "KeyShot Package File",
                "groupLabel": "KeyShot Settings",
                "fileFilters": [
                    {"label": "KeyShot Package files", "patterns": ["*.ksp", "*.bip"]},
                    {"label": "All Files", "patterns": ["*"]},
                ],
            },
            "description": "The KeyShot package file to render.",
        },
...

Code Snippet

Relevant line:

OPENJD_REQUIRED_PARAMETER_FIELDS: List[str] = ["default"]

@crowecawcaw crowecawcaw added the bug Something isn't working label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant