https://dagster.io/ logo
Title
s

Sean Han

12/16/2022, 1:20 AM
Hi, how long does it take for new environment variables set in Dagster cloud UI to take effect? I have a job run that complains about missing env variables, I added that in UI and rerun the job, it still complains about missing env variables. I’m sure I selected the right scope. Is there anything else I need to do to make it work.
d

daniel

12/16/2022, 1:51 AM
Hi Sean - what version of dagster are you using?
If this is in a branch deployment, you may need to press "Redeploy" from the Code Locations tab - then the new env vars should show up
(by pressing Deployment => Code Locations - then there's a "Redeploy" button on the right hand side)
We have a fix in the works that will make it so that they're automatically updated and this step isn't needed, but that should work for now
s

Sean Han

12/16/2022, 3:32 AM
Let me try redeploy, not sure how to get the dagster version since I’m not admin
d

daniel

12/16/2022, 3:33 AM
If it’s a branch deployment I bet the redeploy will do it
s

Sean Han

12/16/2022, 3:40 AM
I think the agent version is v1.0.16. After redeploy it still can’t find the env variable. I’m using python
os.getenv
to get it directly. Do I have to add the variable key to
dagster.yaml
or
dagster_cloud.yaml
if I set it in UI?
d

daniel

12/16/2022, 3:42 AM
Oh wow, thanks for checking. Environment variables actually require 1.0.17 or higher, that's the version where the feature was launched
once you upgrade, I'd expect it it work
(it'll require both the agent and the dagster version in the image that's running your code to be at that version or higher)
❤️ 1
s

Sean Han

12/16/2022, 3:44 AM
Thanks, Dagster is advancing so fast! We should catch up
😒onic: 1