You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Plan --select-model doesn't allow adding unmodified models to an existing dev environment #5497
plan --select-model A dev creates a dev environment, even if there are no changes to the selected model compared to prod. However, it is not possible to add an unmodified model B to the existing environment dev with plan --select-model B dev. I'm unsure whether this is intended.
How to reproduce
Execute the following commands (demo duckdb project):
sqlmesh init
sqlmesh plan
sqlmesh plan --select-model sqlmesh_example.incremental_model dev
sqlmesh plan --select-model sqlmesh_example.incremental_model --select-model sqlmesh_example.full_model dev
Current behavior
Step 4. results in
No changes to plan: project files match the dev environment
Expected behavior
Model sqlmesh_example.full_model gets added to the dev virtual environment.
Notes
Adding unmodified models to an existing virtual environment can be useful, I think (e.g. when working with pinned_environments or for testing purposes).
If step 3. is omitted, the dev environment will be created with both models sqlmesh_example.incremental_model and sqlmesh_example.full_model. So, one possible workaround is to create a new virtual environment instead of updating the old one.
It's possible that I'm using it incorrectly, but --include-unmodified seems to add all unmodified models, regardless of the model selected with --select-model. I've submitted a new issue: #5516
Activity
izeigerman commentedon Oct 7, 2025
Try adding the
--include-unmodifiedflag to the plan command. Please feel free to submit a new issue if this doesn't help.xardasos commentedon Oct 9, 2025
It's possible that I'm using it incorrectly, but
--include-unmodifiedseems to add all unmodified models, regardless of the model selected with--select-model. I've submitted a new issue: #5516