Skip to content

Conversation

@izeigerman
Copy link
Member

Fix #5516

@izeigerman izeigerman requested review from a team and Copilot October 23, 2025 17:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue where all models were being promoted when the --include-unmodified flag was used, even when specific models were selected. The fix ensures that only explicitly selected models are promoted when both flags are combined.

Key changes:

  • Updated promotion logic to respect model selection when --include-unmodified is provided
  • Restructured conditional logic to properly handle the combination of include_unmodified and selected_models_to_backfill
  • Added comprehensive test coverage for both --include-unmodified alone and combined with model selection

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/core/integration/test_plan_options.py Added two new test cases to verify promotion behavior with include_unmodified flag both standalone and combined with model selection
sqlmesh/core/plan/definition.py Refactored promotion logic to correctly determine which snapshots should be promoted based on the combination of flags provided

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@izeigerman izeigerman force-pushed the fix-select-models-with-include-unmodified branch from 3ebed02 to 8a38c19 Compare October 23, 2025 18:02
@izeigerman izeigerman merged commit 119b623 into main Oct 23, 2025
36 checks passed
@izeigerman izeigerman deleted the fix-select-models-with-include-unmodified branch October 23, 2025 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plan --include-unmodified option does not respect --select-model option

3 participants