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

Connect dependencies of projects to docker_build ignore/only (possible integration with Nx Monorepo) #6502

Open
endurance-chorus opened this issue Feb 17, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@endurance-chorus
Copy link

Describe the Feature You Want

Hey! I have a question.
Has anyone here tried Nx + PNPM workspaces + making sub packages + using those packages in your NodeJS app + tilt?

Nx gives you ways to manage your monorepo by building out a dependency graph, caching nodes, using that cache during builds, and exposes nice tooling for accessing this stuff (e.g. nx watch , nx build, nx run).
PNPM gives you a way to make relate packages across your repo (e.g. package.json + the workspace:* syntax).
We make packages and reuse them in our NodeJS projects, and we would like to be k8s native during local dev, and, naturally, that led us to Tilt.

Tilt's docker_build seems to be great at noticing the builds (tilt seems to be watching the Context window for Docker), but my shared package files exist in different places in the monorepo. This makes me have to push the monorepo root as context, which means i rebuild when any file changes.
I can try to control it with only or ignore but now i have to list the exact subpackages in the repo that it cares about. Ideally, tilt would already know.

(Possible Feature Request here)
Luckily, nx does know, and it would be great if i could pipe my project and its dependent subpackages automatically to tilt's ignore or only fields so it only rebuilds when it should, instead of whenever literally anything in the repo changes.
Has anyone faced this? How did you solve it? Is my feature request possible?

Current Behavior

Tilt has only/ignore which works, but users must manually manage dependencies rather than being automatic.

Why Do You Want This?

I would like to reduce the complexity of the Tiltfile management process for teams.

@endurance-chorus endurance-chorus added the enhancement New feature or request label Feb 17, 2025
@nicks
Copy link
Member

nicks commented Feb 17, 2025

Yeah, we usually see Bazel users do this with either tilt extensions or tiltfile scripting, here's an example - https://docs.tilt.dev/example_bazel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants