Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for updating env variables without restarting app #1570

Open
vpavic opened this issue Jul 28, 2020 · 8 comments
Open

Add support for updating env variables without restarting app #1570

vpavic opened this issue Jul 28, 2020 · 8 comments

Comments

@vpavic
Copy link

vpavic commented Jul 28, 2020

At present, the heroku config:set and :unset CLI commands will restart the app immediately after applying the env variable change.

This might not always be desirable. For instance, if I'm adding env variables that will be only consumed by the next release of the app, it does not make sense to restart the currently deployed app.
Coming from Cloud Foundry I've found this very surprising, as cf client doesn't do implicit restarts after manipulating environment but rather has a dedicated restage command for that purpose.

Please consider adding an option to the heroku config:set and :unset CLI commands that would prevent restarting the app.

My environment is:

$ heroku --version
heroku/7.42.5 linux-x64 node-v12.16.2
@chrismo
Copy link

chrismo commented Aug 11, 2020

Agreed. In our use case, we setup user connections to the database, and adding or removing users causes app restarts on each change. It'd be great if we could bulk up the changes to ENV variables for addon:attach and detach of the credentials, then do a restart. (I browned out our site the other day running a script to move users to a new follower, forgetting that each remove AND each add triggers a separate restart).

@vpavic
Copy link
Author

vpavic commented Oct 1, 2020

Any feedback from the maintainers on this proposal?

@alexvictoor
Copy link

Indeed this feature would be very useful

@luizsignorelli
Copy link

Heroku should strongly consider this proposal

@mars
Copy link
Member

mars commented Jan 6, 2022

heroku config:edit CLI command supports batching of manual config changes, using the config-vars API.

While this doesn't solve the challenge with addon-related config var updates restarting the app, it does help for other types of config var changes.

@cpor3
Copy link

cpor3 commented Oct 27, 2023

Any news regarding this issue?
I also consider this feature really useful.

@davidemerritt
Copy link

This would be very useful +1

@replusminus
Copy link

Very useful to have it.

I am now trying to deploy a new version for my app where production credentials are used.
When I try to deploy the app it fails because the env with the key to decrypt the credentials is not the correct one.
Setting the env key before fails because app restarts.

It would be great to have an argument were one could set env vars for the deploy:

--vars RAILS_MASTER_KEY=XXXX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants