k8s_resource.objects param doesn't let you distinguish btwn two identical k8s entities
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go, kubernetes
- Domain
- devtools, infrastructure
Research direction
Reproduce the issue with the Tiltfile and k8s_resource.objects example from the report. Start by tracing how the objects selector handles the documented name:kind:namespace form and the unique-fragment error. Done means identical Kubernetes entities can be distinguished or selected as requested, with a useful error when selection remains ambiguous.
Written by the indexing model from the issue text.
Description
Expected Behavior
k8s_resource.objects param should let you specify any k8s entity that Tilt knows about
Current Behavior
In the case where Tilt has two of the same k8s entities, Tilt names them by appending an index to the end, like so:
foobar:pod:my-ns:apiextensions.k8s.io:0foobar:pod:my-ns:apiextensions.k8s.io:1
There is no way to disambiguate them via k8s_resource.objects (since that param. only accepts selectors of the form name:kind:namespace--otherwise you get the error "Too many parts in selector. Selectors must contain between 1 and 3 parts (colon separated)"). If you pass foobar:pod:my-ns, you get:
"foobar:pod:my-ns" is not a unique fragment. Objects that match "foobar:pod:my-ns" are "foobar:pod:my-ns", "foobar:pod:my-ns"
- The error message is unhelpful, but more importantly
- you will never be able to use
k8s_resource.objectsto specify either/both of these entities, b/c theobjectsparam REQUIRES you to uniquely specify an entity, and tilt gives you no way to do this if the entities are identical. This param should probably let you specify entities non-uniquely (see #3727) -- tho at minimum, if it requires you to specify entities uniquely, you should be able to in this case.
Steps to Reproduce
- Tiltfile:
load('ext://helm_remote', 'helm_remote') REPO_URL = 'https://containous.github.io/traefik-helm-chart' OBJ = 'tlsoptions.traefik.containo.us:CustomResourceDefinition:default' helm_remote('traefik', repo_name='traefik', repo_url=REPO_URL, namespace='default', version='8.9.0') k8s_resource('traefik', port_forwards='8000', objects=[OBJ] ) tilt up- See error (snapshot):
"tlsoptions.traefik.containo.us:CustomResourceDefinition:default" is not a unique fragment. Objects that match "tlsoptions.traefik.containo.us:CustomResourceDefinition:default" are "tlsoptions.traefik.containo.us:CustomResourceDefinition:default", "tlsoptions.traefik.containo.us:CustomResourceDefinition:default"
About Your Use Case
Reported by Isaac Wilder in Slack. Minor issue/not blocking.
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 413
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 6
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.
More from tilt-dev/tilt
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 45/100
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Tilt at scale Openenhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100