<#3990 [BUG] Validate resource overrides at regist...
# flyte-github
a
#3990 [BUG] Validate resource overrides at registration time Issue created by katrogan Describe the bug It shouldn't be possible to set
with_overrides
as workflow inputs so that promise values, rather than quantities get captured at registration time see
Copy code
"task_node": {
                "reference_id": {
                  "resource_type": "TASK",
                  "project": "flytesnacks",
                  "domain": "development",
                  "name": "workflows.mywf",
                  "version": "abc123=="
                },
                "overrides": {
                  "resources": {
                    "limits": [
                      {
                        "name": "CPU",
                        "value": "Promise(node:.cpu_override)"
                      },
                      {
                        "name": "MEMORY",
                        "value": "Promise(node:.mem_override)Gi"
                      },
                      {
                        "name": "GPU",
                        "value": "Promise(node:.gpu_override)"
                      },
                      {
                        "name": "EPHEMERAL_STORAGE",
                        "value": "Promise(node:.ephemeral_storage_override)Gi"
                      }
                    ]
                  }
This predictably fails at execution time to create the CRD with
Description: Failed to parse resource as a valid quantity.: quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'\n\n\tError 1: Code: WorkflowBuildError, Node Id: , Description: Failed to parse resource as a valid quantity.: quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'\n","ts":"2023-08-25T22:53:50Z"}
Expected behavior Catch invalid overrides at registration time. Additional context to reproduce No response Screenshots No response Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte