local_resource should have a way to expose stdin
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 413
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 6
Description
Repro steps:
- Checkout tilt
- Add this Tiltfile
local_resource('web', serve_cmd='cd web && yarn run start')
Expected behavior:
We should start up the tilt webpack server on 3000
Actual behavior:
The tilt webpack server dies with exit code 0 immediately
The problem:
Webpack exits immediately if no stdin is attached to the process
The workaround:
Rewrite the Tiltfile like this:
local_resource('web', serve_cmd='cd web && tail -f /dev/null | yarn run start')
which creates a "dumb" stdin that webpack can pull from forever
Possible solutions:
Most orchestration systems have an stdin parameter so you can specify stdin
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core
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 at the local_resource entry point and trace how serve_cmd processes are started and how stdin is handled. Compare the behavior with the reported webpack reproduction and the Kubernetes stdin reference; done means local_resource can keep a process that requires stdin running without the shell workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100