local that generates yaml causes infinite loop
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 413
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 6
Description
A Tiltfile like below will cause an infinite loop:
local('gen_file.py > foo.yaml')
k8s_yaml('foo.yaml')
This happens because foo.yaml will always be touched.
There are a few ways to fix this.
A workaround is to do text = local('cat foo.yaml'). This will end up reading the file, but not record a dep.
read_file could take an arg saying it shouldn't record a dependency. This could be dangerous, and cause bugs.
local could take arguments of files it expects to touch, and Tilt could ignore edits to them while the command is running.
Ran into this onboarding a user who used make tilt as the command to generate yaml.
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 reproducing the provided Tiltfile with local('gen_file.py > foo.yaml') followed by k8s_yaml('foo.yaml'), then trace how local and k8s_yaml record file dependencies. The issue lists several possible directions but does not select one; done should mean this workflow no longer loops while dependency tracking remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100