tilt-dev / tilt-dev/tilt

Express dependency of one resource on the latest version of another resource

Open
#3,667 7 comments 14 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

I would like a way to say "'foo' depends on 'bar'. If 'bar' changes, reload 'foo' with the most recent and up-to-date version of bar".

For example, in my team's Tiltfile, we have a local_resource which runs unit tests for our main webapp. I've set a dependency in the testing local resource on the webapp, i.e. local_resource('run_tests', cmd='./run_tests.sh', ..., resource_deps=['core-webapp']). In practice, I've found that updating core-webapp triggers a test run, but usually the test run is against an out of date version of the webapp. This makes it appear that a test is still broken, even if the most recent change fixes it, and makes it look like tests are fine, even when the most recent change broke things. Usually, manually running tests a second time shows correct results.

https://docs.tilt.dev/resource_dependencies.html says "This feature currently mostly only helps in the common case that different versions of services are broadly compatible with each other, and focuses on ensuring that some instance of a resource’s dependencies exist, without worrying too much about whether it’s a current version. For this reason, resource_deps currently only affects the first build after a tilt up. e.g., Once any version of database has been running at least once, its dependencies are unblocked to build for the rest of Tilt’s lifetime."

We would like to depend on the current version, please!

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 with resource_dependencies.html and the local_resource/resource_deps behavior described in the issue. Reproduce the example from the Tiltfile to observe when a dependent resource runs relative to its dependency. Done means dependencies use the most recent version, rather than merely any previously started version, and the documented behavior is updated.

Written by the indexing model from the issue text.

Assessment

Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.