wide-diamond-57477
03/11/2022, 10:34 PMancient-application-36103
03/11/2022, 10:34 PMancient-application-36103
03/11/2022, 10:36 PMancient-application-36103
03/11/2022, 10:38 PMwide-diamond-57477
03/11/2022, 10:38 PMsecret:$secret_name
, this should be straightforward.
For the JSON-style secrets, the user would specify secret:$secret_name:$json_key::
. One proposal would be to concatenate $secret_name and $json_key to create the environment variable.
My biggest concern though is what characters are allowed in a secret name — for example, I just created the secret name 9/_+=.@-
ancient-application-36103
03/11/2022, 10:38 PMancient-application-36103
03/11/2022, 10:39 PM@batch(secrets={'secret_name':'secret_arn'})
wide-diamond-57477
03/11/2022, 10:41 PMancient-application-36103
03/11/2022, 10:43 PM@conda
takes in a map as args - you can take a look at that.ancient-application-36103
03/11/2022, 10:43 PMancient-application-36103
03/11/2022, 10:43 PMwide-diamond-57477
03/11/2022, 10:45 PMancient-application-36103
03/11/2022, 10:47 PMwide-diamond-57477
03/12/2022, 2:46 AM--with batch
arguments for run
versus step-functions create
The former will always hit this type conversion and by the time Batch
is instantiated, secrets
is a dictionary: https://github.com/stevenhoelscher/metaflow/blob/inject-secrets-into-aws-batch/metaflow/plugins/aws/batch/batch_cli.py#L279-L305
The latter will never hit the type conversion and by the time Batch
is instantiated, secrets
is still a JSON-encoded string: https://github.com/stevenhoelscher/metaflow/blob/inject-secrets-into-aws-batch/metaflow/plugins/aws/step_functions/step_functions.py#L654-L679
I’m hesitant to have additional logic to handle this edge case, so looking for input at your leisurewide-diamond-57477
03/17/2022, 4:29 PMancient-application-36103
03/17/2022, 4:33 PMancient-application-36103
03/18/2022, 11:17 PM