-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Disabled Models in schema files #5868
Merged
Merged
Changes from 20 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
1a68f8a
WIP
emmyoop 4702502
WIP
emmyoop dfd7af8
clean up debugging
emmyoop 21c9d03
reword some comments
emmyoop 5a98b26
changelog
emmyoop 61268a1
add more tests
emmyoop a750db7
move around the manifest.node
emmyoop 3a4bf39
fix typos
emmyoop b6ed9b8
WIP
emmyoop 1bc9c0f
still WIP
emmyoop e464f5d
all tests passing
emmyoop 42bfdf7
move logic for moving around nodes
emmyoop c5ee79e
add tests
emmyoop 1cbb960
more cleanup
emmyoop f4d765b
fix failing pp test
emmyoop 931c603
remove comments
emmyoop 2374de1
add mroe tests, patch all disabled nodes
emmyoop 834e825
fix test for windows
emmyoop e9f88aa
fix node processing to not overwrite enabled nodes
emmyoop 5789d64
add checking disabled in pp, fix error msg
emmyoop b2a6156
stop deepcopying all nodes when processing
emmyoop 78c58af
update error message
emmyoop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
kind: Fixes | ||
body: Account for disabled flags on models in schema files more completely | ||
time: 2022-09-16T10:48:54.162273-05:00 | ||
custom: | ||
Author: emmyoop | ||
Issue: "3992" | ||
PR: "5868" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
13 changes: 13 additions & 0 deletions
13
test/integration/068_partial_parsing_tests/test-files/models-schema4.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: 2 | ||
|
||
models: | ||
- name: model_one | ||
description: "The first model" | ||
- name: model_three | ||
description: "The third model" | ||
config: | ||
enabled: false | ||
columns: | ||
- name: id | ||
tests: | ||
- unique |
13 changes: 13 additions & 0 deletions
13
test/integration/068_partial_parsing_tests/test-files/models-schema4b.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: 2 | ||
|
||
models: | ||
- name: model_one | ||
description: "The first model" | ||
- name: model_three | ||
description: "The third model" | ||
config: | ||
enabled: true | ||
columns: | ||
- name: id | ||
tests: | ||
- unique |
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
I'm a little concerned by the overhead of deepcopying the entire nodes dictionary. Maybe we could have a list of disabled unique_ids, leave the 'add_disabled_nofile' in place, and just remove the disabled nodes afterward? I'm not so concerned by the disabled dictionary because it will be much smaller.
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.
Oh, that's cleaner than creating a list of all nodes. 👍