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.
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
[SNOW-90] Introduce CI job to test
schemachange
updates against a clone #78base: dev
Are you sure you want to change the base?
[SNOW-90] Introduce CI job to test
schemachange
updates against a clone #78Changes from all commits
ed485ba
b388915
e3c575a
ae8d75d
4371e0b
c9989e5
1b136f0
680ecaa
7d946ed
a342f85
244216b
4f35760
ab2a048
be2e82f
fb4a208
913ef4c
ded7408
b25b10d
2bdc6ef
2090fad
b0ebf0c
d91d5ab
6a7b631
d8c8927
38da909
c75abba
1a5160f
1edbb83
1bc7f04
a94ea31
cee2c5e
df3a91f
46c8390
ca73fb6
6fe39ca
88c7b00
939c9f7
4116019
bac91b8
1ffafa9
c44ae9e
a3eade5
d76999f
89f06b4
93253a2
6e0d537
9b187c1
3bbd05c
4f042c0
d2a2452
ba646fa
6e24035
fc3a85d
cb218a5
06996ab
ea07518
9d4aaaa
03dfc5a
ab9297a
8498feb
ed645f3
ced4d2c
3a90e92
a85a5ca
8e78bd8
294244f
f75fb49
65cfebb
9d8fde0
6f2052a
55cbfd8
9a622ca
2c9bab2
912b974
d0880d8
c6ba8d5
8b50065
00c2a3c
5babc72
97d0b7b
517525f
8e3dc71
80c00ff
cd89f20
95be97e
30be842
a053393
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Do we want to COPY CURRENT GRANTS rather than REVOKE so that we can imitate the source object as closely as 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.
Initially, I would say no, mainly because the only role that should be interacting with the clone and its objects is
DATA_ENGINEER
for the purpose of testing and validation anyway. Also becauseCOPY CURRENT GRANTS
would copy over theDATA_ENGINEER
s previous grants before it became owner, so it would be redundant.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 wondering how we might test changes to privileges. If we've already revoked current grants on an object, then how can we check that whatever changes we've made to privileges granted on an object reflect what we are expecting?
For example:
object_dev
object_clone
(before schemachange)object_clone
(after schemachange)Assuming that schemachange applied some arbitrary change set to the privileges (like adding privilege d, revoking some other privileges), how can we test
grants on object_dev
+our change set
=grants we expect on this object
?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.
This is a good point - If we plan to add tests for updates in object privileges, then I agree we should not revoke any grants. I'll do a test to make sure
COPY CURRENT GRANTS
doesn't overrideDATA_ENGINEER
s new ownership, and make a commit for this. Thanks!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.
If I am understanding this will only drop the clone when the PR is merged or closed. However, a cloned DB is created on any push when the PR is labeled and open.
Would this mean that only the last
github.head_ref
is cleaned up? In the end we would want to cleanup both thehead_ref
when things are merged, AND, when a new push is added (and head_ref is updated) we'd also want to drop the previous cloned DB.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.
Good question - Yes, this means that the last
github.head_ref
is cleaned up. However, this is not a concern because it's the only cloned DB on snowflake, for a given feature branch. All predecessor clones just get replaced by a new clone.So for example if
head_ref
issnow-90-my-branch
, the procedure goes like this:synapse_data_warehouse_dev_snow_90_my_branch
synapse_data_warehouse_dev
with aCREATE OR REPLACE
. the new clone has the same name as the last clone, so it does aREPLACE