Skip to content

Conversation

@frankyn
Copy link
Contributor

@frankyn frankyn commented May 12, 2022

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> ☕️

If you write sample code, please follow the samples format.

@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. api: storage Issues related to the googleapis/java-storage API. labels May 12, 2022
@frankyn frankyn changed the title Feat bucket metadata feat: bucket metadata May 12, 2022
@frankyn frankyn changed the base branch from main to feat/grpc-storage May 12, 2022 00:58
@frankyn frankyn force-pushed the feat-bucket-metadata branch from 848ab5d to bbce3fd Compare May 12, 2022 01:14
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: xl Pull request size is extra large. labels May 12, 2022
* Introduce StorageArbitraries where we can put common arbitraries which aren't globally registered by type.
ifNonNull(from.getLocationType(), to::setLocationType);
ifNonNull(from.getMetageneration(), to::setMetageneration);
ifNonNull(from.getBilling(), Billing::getRequesterPays, to::setRequesterPays);
ifNonNull(from.getCreateTime(), Timestamp::getSeconds, to::setCreateTime);
Copy link
Contributor

Choose a reason for hiding this comment

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

The time values in these conversions is a bit confusing.. I believe that for BucketInfo the values should be in milliseconds but there is no option in Timestamp to set milliseconds. see https://cloud.google.com/java/docs/reference/google-cloud-storage/latest/com.google.cloud.storage.BucketInfo#com_google_cloud_storage_BucketInfo_getUpdateTime__
however update time is the only field that specifically calls out milliseconds from unix epoch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, we may not catch more of these until we get into integration testing.

We can use toMillis(), thanks!

@frankyn frankyn force-pushed the feat-bucket-metadata branch from 9be0aad to d15fc94 Compare May 12, 2022 22:28
@BenWhitehead BenWhitehead marked this pull request as ready for review May 13, 2022 20:58
@BenWhitehead BenWhitehead requested review from a team as code owners May 13, 2022 20:58
@BenWhitehead BenWhitehead merged commit 1600f5e into feat/grpc-storage May 13, 2022
@BenWhitehead BenWhitehead deleted the feat-bucket-metadata branch May 13, 2022 21:00
sydney-munro pushed a commit that referenced this pull request Jun 7, 2022
…etGetOptions...) (#1385)

* Introduce StorageArbitraries to contain common arbitraries which aren't globally registered by type.

Co-authored-by: BenWhitehead <BenWhitehead@users.noreply.github.com>
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.

3 participants