heroku / cli

Heroku CLI
https://devcenter.heroku.com/articles/heroku-cli
ISC License
849 stars 221 forks source link

Add support for updating env variables without restarting app #1570

Open vpavic opened 4 years ago

vpavic commented 4 years ago

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 commented 4 years ago

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 commented 3 years ago

Any feedback from the maintainers on this proposal?

alexvictoor commented 3 years ago

Indeed this feature would be very useful

luizsignorelli commented 3 years ago

Heroku should strongly consider this proposal

mars commented 2 years ago

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 commented 10 months ago

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

davidemerritt commented 9 months ago

This would be very useful +1

replusminus commented 7 months ago

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