Hi,
when updating device environment variables (either from dashboard, or from API), device container is instantly restarting.
Is it possible to prevent this from happening?
Use case: I want to update multiple envVars at once. Using API this can be done within just a few seconds, but device restarts all the time.
Idea is to have something like a restart lock:
process would be then:
restart-lock = true
update var 1
update var 2
update var 3
…
restart-lock = false
-> device restarts
Currently whenever an environment (or service) variable is updated, the Application container is indeed restarted.
However, there is a locking mechanism available that stops the Supervisor from restarting your container for updates, see here for details. However, this works on-device only and is controlled entirely by the App.
You could potentially include a mechanism in your Application to create this lock, apply the required variable changes, and then release the lock, to allow the Supervisor to update it.
I just accidentally killed a beta device during operation by changing a service variable that was only meant for a specific development device. I think it would be nice if we could pin to versions of device variable sets or something similar to the way you can pin releases. My approach for the time being is going to be to avoid fleet level service variables to try and mitigate this but I’m still worried about doing something on accident and killing a bunch of production machines.