tilt-dev / tilt-dev/tilt

provide way to skip Tiltfile work that's only required by deselected resources

Open
#5,325 0 comments 1 reaction 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

Describe the Feature You Want

A Tiltfile might run code that takes a non-trivial amount of time in order to create a resource (e.g., cloning a large git repo).
e.g., if a user runs tilt up svc1 svc2 svc3, it'd be nice to skip any such work that is not needed for those three resources.

Current Behavior

The Tiltfile runs everything, and then just doesn't do anything with resources that were not selected.

Why Do You Want This?

This is especially acute if constructing a resource is expensive and typical use of the Tiltfile only enables a fraction of those resources. One customer reported their Tiltfile took a minute or two to execute, mostly spent on resources that were not enabled.

Additional context
Some possibilities:

  • document how to write a Tiltfile that uses if statements to skip this work when resources are disabled
  • add a mechanism to specify a block of Tiltfile code that only runs when a given resource is enabled
    • this might be a Tiltfile API to specify a function that gets called to define a resource when it's enabled, or a whole Tiltfile per resource

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

No files, tests, or entry points are identified in the issue. Start by comparing the proposed conditional Tiltfile API and per-resource approaches, then define the expected behavior for expensive work tied to deselected resources.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
developer-experience
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.