no way to express build dependencies in Tilt
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 413
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 6
Description
Currently, Tilt has resource_deps for expressing runtime initialization dependencies (e.g., "You need to start up the database before the frontend").
But Tilt has no way to express other types of dependencies, including:
-
A common pattern is to have a local_resource that generates files, and then a docker_build that syncs those files to a container. (e.g., generating API documentation in tilt.build, compiling Go static binaries). This workflow has a bunch of rough edges (logs aren't grouped like you would expect them, redundant builds, etc)
-
Another common pattern is to have a local_resource that solely exists to kick off another build (e.g., the "touch Tiltfile" script described in https://github.com/windmilleng/tilt/issues/2957, or the "measure deployment" script described in https://docs.tilt.dev/example_static_html.html). These scripts are prone to race conditions and infinite loop problems (https://github.com/windmilleng/tilt/issues/1930)
People often try to do this with resource_deps, and are confused about why it doesn't work. See also discussion on this PR: https://github.com/windmilleng/tilt/pull/2837#issuecomment-578315808
I don't know what the solution is to this problem, or even if (1) or (2) are the same problem. This issue is just to have a place to point people who ask about this while we think about what to do about it.
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
Start by comparing the two workflows described: generated files consumed by docker_build, and local_resources that trigger another build. Read the linked issues 2957 and 1930 plus the discussion on pull request 2837 to understand the existing resource_deps behavior and failure modes. Done means a decided dependency model that addresses these cases without the described race conditions or redundant builds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go, kubernetes
- Domain
- build-system, developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100