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
feat(bigtable): Backup Level IAM #3222
Merged
Merged
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
1819733
feat(bigtable): Backup Level IAM
AlisskaPie 127937c
SetIAMPolicy, TestIAMPermissions
AlisskaPie 1b4b43b
test
AlisskaPie bcf684c
mock setup
AlisskaPie ab7d4f2
delete draft part
AlisskaPie da59b03
cosmetic changes
AlisskaPie 085c20c
v1 to iampb
AlisskaPie df99660
rename methods
AlisskaPie 28277fc
Merge branch 'master' into backup_level_iam
AlisskaPie c4d1dbc
code review changes
AlisskaPie 30edfa8
Apply suggestions from code review
AlisskaPie 1297f50
fix comment
AlisskaPie b31e4dd
remove a mock
AlisskaPie f68c9dd
add backupPath utility, check for get/set policy
AlisskaPie b1a59aa
Merge branch 'master' into backup_level_iam
AlisskaPie df139af
Merge branch 'master' into backup_level_iam
AlisskaPie ab73206
Merge branch 'master' into backup_level_iam
tritone File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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
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
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.
Given this is an integration test file, it feels like we shouldn't be mocking out the interactions. It's probably enough to follow the pattern of
TestIntegration_TableIam
(which should beIAM
, but that's another story 🙃).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.
+1. @kolea2 do you know how other languages are handling this testing, and if we will face any quota-related issues?
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.
It's strange, but I got an error while comparing policies without mocking. I had an
Etag
mismatch, even in the read-modify-write cycle.From documentation:
Will wait for response!
P.S. Anyway, I can also rename
TestIntegration_TableIam
toTestIntegration_TableIAM
here :)It's related to this PR.
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.
The Etag should only change when there is a modification. So, something else must have modified the value between the initial read and the subsequent attempted write. Mind uploading the updated test without the mock, even if it isn't passing yet?
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.
Yes, sure!
Uploaded.
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.
@tritone for Java we take the existing IAM policy and reset it. Probably could be improved: https://github.com/googleapis/java-bigtable/blob/master/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableTableAdminClientIT.java#L194-L217. I haven't seen any quota related issues so far.
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.
@tbpg @tritone any additional thoughts here?