- 
                Notifications
    You must be signed in to change notification settings 
- Fork 176
drop the grants of authorized view when it's full refresh #1189
base: main
Are you sure you want to change the base?
drop the grants of authorized view when it's full refresh #1189
Conversation
1905626    to
    8b46b6c      
    Compare
  
    8b46b6c    to
    9ae626d      
    Compare
  
    | Mind adding another functional test? | 
18e55ce    to
    6f9632a      
    Compare
  
    6f9632a    to
    b3ef011      
    Compare
  
    | Thank you for your feedback, Colin. I tried to address all the points you raised in your review. | 
1744e65    to
    adeefeb      
    Compare
  
    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.
Just one question on the use of sleep
| # Need to run twice to validate idempotency | ||
| results = run_dbt(["run"]) | ||
| assert len(results) == 2 | ||
| time.sleep(10) | 
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.
Why do we need the sleep call?
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 don't know exactly why they used it, I found the sleep call already existing in the not full-refresh call of the function, I reproduce it by precaution.
| This PR has been marked as Stale because it has been open with no activity as of late. If you would like the PR to remain open, please comment on the PR or else it will be closed in 7 days. | 
resolves dbt-labs/dbt-adapters#573
Problem
When you delete a view in BigQuery, all associated dataset grant access are lost because they are tied to the view's ID rather than its name. Consequently, during a full refresh that involves dropping the view, the old grants are not automatically removed and new ones must be created. This oversight can lead to various bugs and inconsistencies.
Solution
Delete the grant to the dataset when we are on full refresh
Checklist