<#3473 [BUG] Secret name should be validated on fl...
# flytekit
a
#3473 [BUG] Secret name should be validated on flytekit side and propeller should handle auto aborting/cancelling it Issue created by pmahindrakar-oss Describe the bug Currently workflows using non-conformed secrets cause error when propeller tries to create pods using the created CRD
Copy code
flytepropeller-1 flytepropeller E0315 17:26:22.419072       1 workers.go:102] error syncing 'flyte-attendant-development/fbf61da4211b749988f0': failed at Node[n1]. RuntimeExecutionError: failed during plugin execution, caused by: failed to execute handle for plugin [container]: [Invalid] failed to create resource, caused by: Pod "fbf61da4211b749988f0-n1-0" is invalid: [spec.containers[0].env[26].name: Invalid value: "_FSEC_ARN:AWS:SECRETSMANAGER:US-EAST-2:356633062068:SECRET:_OPENAI_API_KEY-QA0K0U": a valid environment variable name must consist of alphabetic characters, digits, '_', '-', or '.', and must not start with a digit (e.g. 'my.env-name',  or 'MY_ENV.NAME',  or 'MyEnvName1', regex used for validation is '[-._a-zA-Z][-._a-zA-Z0-9]*'), spec.containers[0].env[26].valueFrom.secretKeyRef.name: Invalid value: "arn:aws:secretsmanager:us-east-2:356633062068:secret:": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. '<http://example.com|example.com>', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')]
There is no progress that propeller can make with this workflow . This ticket tracks. • Adding validation in flytekit to disallow non-conforming secret names to be registered • Propeller should auto abort/cancel such tasks and send the validation error over so that admin can showcase the issue and the UI can render it • Existing workflows which bypassed this check should some how be flagged Expected behavior Disallow incorrect workflows and propeller should abort if any such incorrect workflows fall through the cracks and flyteadmin and UI should be able to show the right issue in the workflow 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