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

Livepush should be able to handle when a change in code causes a restart loop in the container #40

Open
CameronDiver opened this issue May 27, 2019 · 4 comments
Assignees

Comments

@CameronDiver
Copy link
Contributor

CameronDiver commented May 27, 2019

If some code is synced that causes the main process to exit early, it can be difficult to recover so that we can then sync more code over to the container.

A workaround for now would be to add
|| while true; do sleep 10; done to the end of a CMD step, but it's not ideal. This would have to be done on container creation though, or by recreating the container - which isn't really in the spirit of livepush.

@CameronDiver CameronDiver self-assigned this May 28, 2019
@ebradbury
Copy link

@CameronDiver this is an important feature in my eyes. Could you provide an update?

@CameronDiver
Copy link
Contributor Author

I don't have much of an update at the moment, and honestly it's not really been on my radar (so you letting me know that this would be important to you is very helpful!).

How would you envisage this feature working for you? What about the workaround isn't acceptable for you?

@ebradbury
Copy link

We'll, I've applied the workaround and its getting me by. But it's seems like poor form to have to change the dockerfile in order to get this to work. Also, isn't the workaround effectively disabling docker from restarting the container if there is a legitimate crash? e.g. is it preventing an otherwise beneficial behavior?

@CameronDiver
Copy link
Contributor Author

I hear you on the changing the Dockerfile, it very much goes against what I designed livepush to do.

Livepush would likely perform the workaround in-place though, as I can't really think of a better method of keeping the container alive while we livepush to it. This will of course mask legitimate crashes too.

In my own code, the workaround has been fine, because whenever there is a crash (loop or legitimate) it's something that I do not want to happen, and I've changed some code anyway, retriggering the livepush and restarting the container.

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

2 participants