GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat: add IAM Conditions support by frankyn · Pull Request #120 · googleapis/java-storage
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Conversation
|
| Bindings apiBinding = new Bindings(); | ||
| apiBinding.setRole(binding.getRole()); | ||
| apiBinding.setMembers(new ArrayList<>(binding.getMembers())); | ||
| if (null != binding.getCondition()) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
no reason to put null first; it's a leftover convention from C that doesn't make sense in Java
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| assertEquals(libPolicy, actualLibPolicy); | ||
| assertTrue(new ApiPolicyMatcher(apiPolicy).matches(actualApiPolicy)); | ||
| // Policy actualLibPolicy = PolicyHelper.convertFromApiPolicy(apiPolicy); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
delete it if it isn't relevant. or fix it if it is.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| public void testBucketPolicy() { | ||
| testBucketPolicyRequesterPays(true); | ||
| testBucketPolicyRequesterPays(false); | ||
| // testBucketPolicyV3RequesterPays(true); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
don't comment out code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } | ||
|
|
||
| private void testBucketPolicyV3RequesterPays(boolean requesterPays) { | ||
| if (requesterPays) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Conditionals around asserts are a code smell. This should be two tests, one with and one without requesterPays.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Or two helper methods
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| // Remove a member | ||
| List<com.google.cloud.Binding> updatedBindings = new ArrayList(updatedPolicy.getBindingsList()); | ||
| for (int i = 0; i < updatedBindings.size(); ++i) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
i++ is more common
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| <github.global.server>github</github.global.server> | ||
| <site.installationModule>google-cloud-storage-parent</site.installationModule> | ||
| <google.core.version>1.91.3</google.core.version> | ||
| <google.core.version>1.92.3-SNAPSHOT</google.core.version> |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
No snapshot dependencies.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Doing it temporary until dependency PR is merged/released.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } | ||
|
|
||
| private void testBucketPolicyV3RequesterPays(boolean requesterPays) { | ||
| if (requesterPays) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Or two helper methods
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| <github.global.server>github</github.global.server> | ||
| <site.installationModule>google-cloud-storage-parent</site.installationModule> | ||
| <google.core.version>1.92.5</google.core.version> | ||
| <google.core.version>1.92.6-SNAPSHOT</google.core.version> |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
hard veto on this; we must not depend on snapshots. If this means we have to wait for a release of google core so be it.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'm doing this only for development*
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codecov Report
@@ Coverage Diff @@ ## master #120 +/- ## ============================================ + Coverage 63.4% 63.46% +0.06% Complexity 537 537 ============================================ Files 30 30 Lines 4752 4752 Branches 427 427 ============================================ + Hits 3013 3016 +3 + Misses 1579 1576 -3 Partials 160 160
Continue to review full report at Codecov.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@elharo could you help cut a release for libraries-bom, @chingor13 released google-cloud-bom which updated java-core dependency to latest release which has IAM Conditions support. It's blocking the Linkage Monitor. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.