ui does not correctly display in dynamically allocated ports "0:[port]"
Open
Nobody has claimed this yet.
bug
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 413
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 6
Description
Steps to Reproduce
- Update tilt-example-html with
k8s_resource('example-html', port_forwards=["0:8000"])
- Run
tilt up - Visit the Tilt ui
Expected Behavior
the UI should link to the service we're port-fowarding to
Current Behavior
the UI links to localhost:0
Additional Info
The weirdest part of this bug is that the API server actually knows the correct port
$ tilt get pf -o yaml
apiVersion: v1
items:
- apiVersion: tilt.dev/v1alpha1
kind: PortForward
metadata:
annotations:
tilt.dev/log-span-id: kubernetesapply:example-html
tilt.dev/resource: example-html
creationTimestamp: "2023-10-10T21:53:23Z"
name: example-html-example-html-bc598cb58-pxq7t
ownerReferences:
- apiVersion: tilt.dev/v1alpha1
blockOwnerDeletion: true
controller: true
kind: KubernetesDiscovery
name: example-html
uid: 28f91202-4a98-4dd6-bf11-5e48f87c9fa4
resourceVersion: "92"
uid: 7b36ea85-6ab4-4cf6-a640-ab5ec31f86e7
spec:
cluster: default
forwards:
- containerPort: 8000
host: localhost
namespace: default
podName: example-html-bc598cb58-pxq7t
status:
forwardStatuses:
- addresses:
- 127.0.0.1
- ::1
containerPort: 8000
localPort: 46753
startedAt: "2023-10-10T21:53:36.204691Z"
kind: List
metadata:
resourceVersion: ""
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
Reproduce the issue with port_forwards=["0:8000"], then inspect how the Tilt UI renders port-forward links and compare that with the localPort reported by tilt get pf -o yaml. Done means the UI links to the dynamically allocated local port, such as 46753, instead of localhost:0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100