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
Manual restart of pod from dashboard #1928
Comments
thanks for filing! this is a thing we've been talking about and want to implement |
Closing this in favor of #1012. |
Oh whoops my mistake, this is a slightly different case than #1012 (which wants a build-and-deploy, whereas this ticket wants to restart a pod; e.g. if there are no code changes since the last deploy, then a build-and-deploy wouldn't affect anything). Re-opening. |
We've been rolling out our Tilt setup to more developers on our team, and it's come up a few times that it was surprising that the "Force Update" functionality didn't restart the pod if no changes were made to the image. Offhand, I can't think of any reason why someone who clicks the Force Update button would not be okay with the pod being restarted, but maybe there is one? Either way, I think having an easy way to force a restart of a pod would line up well with the "'Turn it off and on again" philosophy mentioned in the blog post. Right now our fallback is to tell the user to delete the pod with Let me know if any other info from our use case would help! |
Just adding another use case to this - I'm working on integrating istio into certain profiles and actually have istio redeployed/reconfigured as part of the Tiltfile. E.g., adding sidecar injection. My options now are to either |
Thanks for the extra info, both of you! As I'm thinking about this more: are either of you using live update? Because restarting a pod wipes out any in-place changes we've made during live update, this feature is more technically complicated than I originally thought. Would an acceptable starting point be a command that forces a rebuild AND forces a pod update? Otherwise, I'm not sure we could guarantee that you'd get the correct code on the restarted pod.* *I mean we actually could, we already check for the case where we've lost in-place changes--but when we detect this case, we just rebuild and redeploy your code, so it amounts to the same thing, but slightly slower and more confusing. edited to add elaboration: there are two cases to consider--
|
I'm using |
(To be clear, we're not prioritizing this feature yet, but I did a little digging to see what the scope might be, if we choose to implement this soon.) In a slack discussion, @andymartin-sch proposed the following options:
Option A seems sufficient to both Andy and myself. It's doubtful a user would want to rebuild the docker image WITHOUT restarting the pod; somewhat more plausible but still unlikely that a user would want to restart the pod without updating it to run the most current code. Option B is tricky to implement today because we don't currently have a concept of a one-off execution of live_update steps; i.e. we can't sync your entire |
I liked Maia's point that
So i put up a PR that changed the behavior of the exiting "force update" button. The suggestion is that the button should rebuild the docker image (taking advantage of the docker layer cache) and restart the pod - #3413 |
The behavior described in #1928 (comment) above, is now available in the latest Tilt release: https://github.com/tilt-dev/tilt/releases/tag/v0.14.3 |
@victorwuky @nicks Would it be possible to make this also cover restarting resources that don't have a corresponding We use the Tiltfile Config to opt-out of building some resources locally (by conditionally running I can spin up a separate issue if that's preferable, thanks! |
Yes please @andymartin-sch . It would be great to have a separate issue to manage that additional case. |
filed as #3454 |
Thanks! |
Ugh, I think I've hit this very issue and spent way too much time trying to diagnose it. In my case, I was tweaking RBAC and the new account name just wasn't propagating to a container in a pod. Solved by ^C and |
Sometimes pods get into a weird state and the best thing to do is just blow it away and start from scratch. Currently, the only way I know how to do this is to re-run
tilt up
, but this restarts all pods. (I also have a standalone rolling-update script which works by patching an environment variable into the container spec, but it would be nice to do it all from the same place.)I'd love to be able to do this from within the cli dashboard, perhaps by selecting the workload and pressing
r
?The text was updated successfully, but these errors were encountered: