-
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
Issue 6444 grant username quotes #8787
Conversation
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Fraser Barton.
|
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Fraser Barton.
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Fraser Barton.
|
1 similar comment
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Fraser Barton.
|
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main dbt-labs/dbt-core#8787 +/- ##
===========================================
- Coverage 86.50% 65.08% -21.43%
===========================================
Files 176 176
Lines 25825 25843 +18
===========================================
- Hits 22341 16821 -5520
- Misses 3484 9022 +5538
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@cla-bot check |
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Fraser Barton.
|
The cla-bot has been summoned, and re-checked this pull request! |
@dbeatty10 I filled in this cla with this link, followed the steps asked by the cla-bot and since done a commit. What have I missed? |
@barton996 it looks like these first two commits are the ones that the cla-bot is barking about: I'm guessing the fix is a force push as described here: Wanna give that a shot and let me know how it goes? |
e657a60
to
021e7f3
Compare
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Fraser Barton.
|
021e7f3
to
5196d88
Compare
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Fraser Barton.
|
Looks like we're still getting an error here - do you want to just start over with a new branch & new PR? Looks like the changes were pretty small, so it may be faster to just copy & paste the code changes in this situation @barton996 |
Apologies I meant to do that on Monday. I'll do it now |
After looking at some ways to "fix" the two commits that @dbeatty10 pointed out, that seems like unnecessary effort. @graciegoheen's method will work. You can also squash merge your changes into another branch on your fork via a PR, which would become a new commit that's definitely signed (because you're doing it in GH). Then just update the branch on this PR to that new branch. |
Replaced by #8809 |
resolves dbt-labs/dbt-adapters#156 resolves dbt-labs/dbt-postgres#55
Problem
For models with grants, where the corresponding table is not new (model has been run before), dbt revokes all grants on this table by looping through all users with table permissions.
The macro currently does not surround the user names that it reads from the table permissions with quotes, meaning that revoke statements on users with usernames like first.last will fail.
This is problematic when granting to a user GROUP, as you cannot control what is returned by the table permissions query using your grant yaml config e.g.
grants: select: ["GROUP developers"]
.Solution
apply_grants.sql jinja template is updated so that usernames are surrounded with adapter.quote() character when granting and revoking.
Checklist