Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebuilds with Live Update: Nested file deps #5372

Closed
maximegel opened this issue Jan 12, 2022 · 7 comments
Closed

Rebuilds with Live Update: Nested file deps #5372

maximegel opened this issue Jan 12, 2022 · 7 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@maximegel
Copy link

Expected Behavior

Nested file deps should trigger live updates.

Current Behavior

Specifying nested files as ressource dependency using local_resource() deps param or using sync() do not trigger a rebuild.

Steps to Reproduce

  1. Add a local_resource() in Tiltfile:
local_resource(
    name = "watch",
    cmd = "cat apps/foo.txt",
    deps = ["./apps/foo.txt"],
)
  1. Edit "./apps/foo.txt"
  2. Nothing happens

It works fine if a move "./apps/foo.txt" in the Tiltfile directory and update the path in Tiltfile.

Context

tilt doctor Output

$ tilt doctor
Tilt: v0.23.5, built 2022-01-07
System: linux-amd64
---
Docker
- Host: [default]
- Server Version: 20.10.11+azure-3
- API Version: 1.41
- Builder: 2
- Compose Version: v1.29.2 (build 5becea4c)
---
Kubernetes
- Env: minikube
- Context: minikube
- Cluster Name: minikube
- Namespace: default
- Container Runtime: containerd
- Version: v1.22.3
- Cluster Local Registry: {Host:localhost:5000 hostFromCluster: SingleName:}
---
Thanks for seeing the Tilt Doctor!
Please send the info above when filing bug reports. 💗

The info below helps us understand how you're using Tilt so we can improve,
but is not required to ask for help.
---
Analytics Settings
--> (These results reflect your personal opt in/out status and may be overridden by an `analytics_settings` call in your Tiltfile)
- User Mode: opt-in
- Machine: d77c3200d1ed9b89b88c2c6c06f96bfc
- Repo: n2qHgzbOabs4cpiCWSL7kA==

About Your Use Case

I just started working with Tilt maybe I'm doing something wrong?

@maximegel maximegel added the bug Something isn't working label Jan 12, 2022
@lianmakesthings
Copy link

Hi @maximegel,
Tilt should be able to handle all file dependencies as long as you provide the correct file path.
I tried this on my local machine and unfortunately wasn't able to reproduce your issue.
Screen Recording 2022-01-12 at 15 09 22 mov

This is a bit of a basic question, but are you sure you saved the file after editing it?

@maximegel
Copy link
Author

Hi @lianmakesthings, yes I saved the file properly. I'm working inside a ubuntu devcontainer and I installed Tilt by downloading and unpacking the release artifact from github. Do it need additionnal ubuntu packages?

@lianmakesthings
Copy link

Hi @maximegel, could you elaborate a bit more on how your setup works?
I understand you run a container with Ubuntu and run Tilt inside that. Do you edit files on your host machine that is mounted into that container, or do they live only in there?

@nicks
Copy link
Member

nicks commented Jan 13, 2022

this is a long shot, but any chance you're running Ubuntu on Windows/WSL2 and have a filesystem that's crossing windows/linux boundaries (e.g., some parts of the directory tree are managed by Windows and some by Linux).

Tilt will generally work on WSL, but there are some nuances if you're running Ubuntu on a filesystem controlled by Windows, and which might behave this way:
microsoft/WSL#4739
#3101

@maximegel
Copy link
Author

I'm developing inside a devcontainer which I access using the Visual Studio Code Remote - Containers extension. So yes, the files are mounted from Windows into a Ubuntu container via a Docker volume.

@lianmakesthings
Copy link

lianmakesthings commented Jan 14, 2022

@maximegel Are you running Ubuntu on WSL2 and could it be related to the issues @nicks linked?
#3101
microsoft/WSL#4739

@nicks
Copy link
Member

nicks commented Jan 28, 2022

marking this as a duplicate of the WSL issue, which has some good workarounds that should help!

@nicks nicks closed this as completed Jan 28, 2022
@nicks nicks added the duplicate This issue or pull request already exists label Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants