restart_container detected as container crash when livenessProbe attached
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 413
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 6
Description
Reported in the #tilt kubernetes slack:
I'm trying to build my binary locally and then just update the container. If I use --update-mode exec it copies the file just fine, but the process doesn't restart. And in order to use that I have to remove restart_container(). If I don't have the update-mode flag, it copies the file, restarts the container and then triggers a full build (on old code because I'm only watching the binary).
The error message they're seeing is:
Detected a container change for platform-api. We could be running stale code. Rebuilding and deploying a new image.
Sounds like restart_container is being detected as a container crash, which would be wrong
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported setup with restart_container(), a livenessProbe, and the default update mode, then compare it with --update-mode exec. Trace how the intentional restart is classified as a container crash. Done means restart_container() no longer triggers a stale-code rebuild, while genuine crashes still do.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100