tilt-dev / tilt-dev/tilt

different live_update steps for the same image

Open
#3,385 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
10.1k
Forks
413
Avg merge
1d 10h
Merged PRs (30d)
6

Description

In the #tilt channel, Robby Pocase asks:

Docker-compose use case - is there a way to have two of the same image running and have different live_reload options? I have two containers which include equivalent source code. One hosts a running application and one that just does the equivalent of jest --watch for running the application tests.

Due to a lib dependency, something is breaking --watch on sync, so I'd like to do restart_container() (or whatever the current recommended equivalent is) on the test container, but not the application container.

I've heard other versions of this. e.g., you have one big "mega-image" with all your services, and you invoke it with different commands in the k8s yaml

The best way to do this right now is to use dependent images: one base image, and then have images with different names that depend on it -- they don't add any layers, they just add the live-update steps.

I don't have a good idea for this now, but wanted to log it in case there are other use-cases I'm not thinking of

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing Tilt's live_update behavior and how dependent images are currently represented. Compare the Docker Compose case with the mega-image and Kubernetes YAML examples described in the issue. Done means there is a decided, documented way to assign different live-update steps to equivalent images without unnecessary image layers.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, kubernetes
Domain
devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.