Declare resource as dependency for ALL other resources (/iterate through available resources?)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 413
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 6
Description
I want to move some slow operations in ClusterAPI's Tiltfile into a local_resource so that they don't happen every time I touch the Tiltfile. These operations need to run before any k8s resources are deployed.
Currently, my new local_resource WILL run before any k8s resources, but that's not a guarantee we make, so not necessarily something I want to explicitly rely on. Maybe we'll eventually want to make this guarantee explicit, but I think even when local_resources are NOT involved, there's a case for being able to declare a universal dependency, i.e. "resource X must build before ALL other resources".
I could theoretically do this with existing Tiltfile primitives IF I knew the names of all available resources ahead of time (and then my implementation would break if a new resource were added). Another way to make "universal dependencies" ergonomic might be something like:
for name in all_k8s_resources():
if name != "some_resource":
k8s_resource(name, deps=["some_resource"]
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
No files or tests are named in the issue. Start by locating the existing k8s_resource and local_resource dependency handling, then determine how available resources are represented and scheduled. Done means users can declare one resource as a dependency of all other resources without listing their names, with coverage for the relevant resource combinations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100