Skip to content

Conversation

@BenWhitehead
Copy link
Collaborator

  • fix: fixup ITAccessTest#testRetentionPolicyNoLock to pass for gRPC
  • fix: fixup ITAccessTest#testUBLAWithPublicAccessPreventionOnBucket to pass for gRPC
  • chore(test): fixup ITAccessTest generic acl and default acl tests to only run for JSON
  • fix: fixup ITAccessTest related to Bucket IAM Policy
  • chore(test): set ITAccessTest#testBucketWithBucketPolicyOnlyEnabled to json only
  • chore(test): set ITAccessTest#testBucketWithUniformBucketLevelAccessEnabled to json only
  • chore: fmt
  • fix: fixup ITAccessTest#testEnableAndDisableBucketPolicyOnlyOnExistingBucket to work with grpc instance
  • fix: fixup ITAccessTest#testEnableAndDisableUniformBucketLevelAccessOnExistingBucket to work with grpc instance
  • fix: fixup ITAccessTest#testEnforcedPublicAccessPreventionOnBucket to work with grpc instance
  • fix: fixup ITAccessTest#testUnspecifiedPublicAccessPreventionOnBucket to work with grpc instance

Introduce TemporaryBucket to provide an AutoClosable bucket which will cleanup on close
… pass for gRPC

Split test into two different tests to cover each of the scenarios:
1. changingPAPDoesNotAffectUBLA
2. changingUBLADoesNotAffectPAP
…only run for JSON

* bucketAcl_requesterPays_false
* bucketAcl_requesterPays_true
* testBlobAcl
* testBucketDefaultAcl
* testBucketPolicyV1
* testBucketPolicyV1RequesterPays
* testBucketPolicyV3

Add IamPolicyPropertyTest and corresponding provider.
@BenWhitehead BenWhitehead requested review from a team as code owners October 10, 2022 20:33
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: storage Issues related to the googleapis/java-storage API. labels Oct 10, 2022

@Test
public void bucketAcl_requesterPays_true() {
assumeTrue(clientName.startsWith("JSON"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have a bug for this? if not a comment on the reasoning for turning these tests off.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are currently skipped due to the acl related operations not yet being implemented for GrpcStorageImpl, we've got tracking tasks for each of those operations which I feel cover these tests.

.collect(ImmutableList.toImmutableList());
to.setBindings(bindings);
List<com.google.iam.v1.Binding> bindingsList = from.getBindingsList();
if (!bindingsList.isEmpty()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be null?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are a few other lists where isEmpty is without a null check first.

Copy link
Collaborator Author

@BenWhitehead BenWhitehead Oct 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, protobuf will never return a null value to us, so we will always get a list of zero or more values.

This same behavior, however does not hold for apiary side of things. The json libraries will both return null if the element is null or undefined. So we need to guard coming out of apiary always.

Our model classes, are unfortunately inconsistent in their nullability handling and we should generally err on the side of null values being possible coming out. I'd like to make this more uniform, but it'll have to wait for a major version boundary.

Copy link
Contributor

@sydney-munro sydney-munro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BenWhitehead BenWhitehead merged commit 59ccd87 into feat/grpc-storage Oct 11, 2022
@BenWhitehead BenWhitehead deleted the grpc/it/access branch October 11, 2022 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the googleapis/java-storage API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants