coiled / feedback

A place to provide Coiled feedback
14 stars 3 forks source link

Sending private environment variables via `coiled run` command #260

Closed andersy005 closed 8 months ago

andersy005 commented 8 months ago

Per documentation, one can send private environment variables via the .send_private_envs() method.

cluster = coiled.Cluster(...)
cluster.send_private_envs({"AUTH_TOKEN_FOR_CUSTOM_DATABASE": "some-token"})

now, i'm wondering if there is a way to use this option with the coiled run .... command. specifically, i'd like to specify the AUTH_TOKEN_FOR_CUSTOM_DATABASE when invoking coiled run .....

for instance, currently, my command looks like this:

coiled run --container quay.io/ORG/CONTAINER  bash main.sh 

i'm curious to know if there are any other better alternatives available at the moment.

dchudz commented 8 months ago

Hi Anderson! We don't have this at the moment, but I think we can add it pretty quickly (likely by tomorrow).

Probably it would look like this: coiled run --env FOO=bar ....

Does that sound good?

andersy005 commented 8 months ago

that would be perfect 🎉 thank you for your prompt response, @dchudz

jrbourbeau commented 8 months ago

@andersy005 --env FOO=bar was just included on our end. We release most days, so the new option will most likely be out by tomorrow (I'll ping this issue when things are out)

dchudz commented 8 months ago

@andersy005 you can try it now with pip install coiled==0.9.38.dev13

andersy005 commented 8 months ago

👊🏽🎉 thank you very much for implementing this quick fix. I just tried it and it works like a charm