tilt-dev / tilt-dev/tilt

no way to express build dependencies in Tilt

Open
#3,048 8 comments 25 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

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:

  1. 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)

  2. 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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.