-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
CT 1990 add access property to parsed nodes #7007
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c3c9fdd
Add "access" attribute to ParsedNode
gshank ef949bd
Fix unit tests
gshank 9d2653e
Fix artifacts test and bump manifest schema version
gshank 9627b95
Changie
gshank b3a8d96
Merge branch 'main' into ct-1990-access_property
gshank 06e74b1
Update some tests
gshank 637ec9b
Put back v8 version of manifest.json
gshank 328a82f
Put back schemas/dbt/manifest/v8.json
gshank e15c2f1
Move access to ModelNode
gshank 15ba2f7
Update v9.json
gshank 2334f88
Update current test state
gshank 984493d
Update unit tests
gshank 98dade4
Update test_events.py and test_artifacts.py
gshank d7c3cf5
Add test for invalid access
gshank 36bfd7a
Remove duplicate addition of groups field to old manifests
gshank 27c40c2
Add yet another test
gshank 164d26f
Throw exception on invalid access_type
gshank 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,6 @@ | ||
kind: Features | ||
body: Add access attribute to parsed nodes | ||
time: 2023-02-18T09:28:16.448175-05:00 | ||
custom: | ||
Author: gshank | ||
Issue: "6824" |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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.
Instead of a warning (which a user can promote to an error), Is it possible to raise a
ParsingError
here instead? I think that's more consistent with existing product expectations for other entities. For example, configuringtype: invalid
on an exposure gets: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.
Also, can we definenevermind!access
on the dataclass declaration for theParsedNode
, simialr to the other class attributes set by this method (created_at, description, patch_path). Ideallyaccess
is aAccessType
if possible.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.
Sure. It's an exception, so it aborts everything, which is not my favorite pattern because if you have multiple errors you have to address them one at a time, but we can certainly do that.
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 not sure what you're suggesting with regard to ParsedNode. It's set in the dataclass declaration for ModelNode, which is where you wanted it.
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 see, makes sense. Still getting my head around patches. Sorry for the confusion!
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.
Agree - but I'm nervous about gracefully handling this invalid config because, given that the default
protected
value is not the most restricted access option. For example, a typo toaccess:priivate
would lead toaccess:protected
on the model, which is probably a more open level of access than the user meant to specify. Hopefully they'd catch it in review / via logs but I think it's worth raising an exception for this case.