This repository was archived by the owner on May 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 288
partial --select support for dbt < 1.5 #682
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sungchun12
reviewed
Aug 15, 2023
sungchun12
reviewed
Aug 15, 2023
@@ -56,17 +55,18 @@ def test_get_models(self): | |||
mock_self.get_dbt_selection_models.assert_called_once_with(selection) | |||
self.assertEqual(models, mock_return_value) | |||
|
|||
def test_get_models_unsupported_manifest_version(self): | |||
def test_get_models_simple_select(self): | |||
mock_self = Mock() | |||
mock_self.project_dir = Path() | |||
mock_self.dbt_version = "1.4.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you mock this with these too to capture all the major manifest versions?
https://docs.getdbt.com/reference/artifacts/manifest-json
- 1.0
- 1.1
- 1.2
- 1.3
sungchun12
suggested changes
Aug 15, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really clever implementation! And the warning message nudges the user to upgrade dbt which is so great!
This failure seems unrelated but |
@dlawin Don't know about the test enough to provide a definite answer but doesn't look like it consistently impacts this PR, so we can ignore it here for now. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR allows
--select
to work with dbt versions < 1.5, but in a much simpler mannerExample on a version < 1.5:
--select <some_input>
The manifest is searched for
<some_input>
directly regardless of any dbt selectors like+, @
or multiple model namesmodel_1 model_2
. In the latter example, it would search the manifest for a single model namedmodel_1 model_2
I've included a warning to help make this clear. See: