-
Notifications
You must be signed in to change notification settings - Fork 316
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
docker_build only param is counterintuitive #5897
Comments
We currently have two APIs for this:
both of which will tell tilt not to rebuild anything when certain files change i don't think we're opposed in theory to having a |
Agreed, it's a tricky thing to get right. I have other resources defined that have different (and conflicting) requirements so those two APIs are too broad for what I need. Ideally, I could define more finely grained watch options like I'm describing on a per resource basis. |
I came across this issue, when I first reached for I hit this problem when the build images uses |
Expected Behavior
It feels counterintuitive the way the
only
parameter fordocker_build
behaves. I want it to only change what files Tilt considers for a rebuild, not change what folders are added to my docker build context.Because Tilt uses this one parameter to do two different things, it's cumbersome to do something that seemingly should be trivial.
I think either this parameters behavior should be changed or a new parameter be introduced.
Current Behavior
This parameter limits what files and folders are sent to the context AND tells Tilt what files to watch.
It does seem to operate how it's documented, though. 😃
I suppose I could list out every folder I want to ignore with the
ignore
param but that feels much too cumbersome.Steps to Reproduce
In this contrived example, I only want to rebuild if a change happens in the frontend folder, while also including an assets directory in my build. Because the context I pass to
docker_build
is broad, any change in my monorepo causes a rebuild. Using theonly
parameter seems like an obvious solution, but it will also change the build context, which I don't want to happen.My file tree looks similar to:
My
docker_build
looks like:And the Dockerfile is similar to:
This build will fail with an error message like this because only the
frontend
folder is sent to the docker build.About Your Use Case
I want a way to tell Tilt, only consider changes to these files or this path for a rebuild, but don't exclude everything else from the build.
The text was updated successfully, but these errors were encountered: