-
Notifications
You must be signed in to change notification settings - Fork 89
feat: bucket metadata #1385
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: bucket metadata #1385
Conversation
848ab5d to
bbce3fd
Compare
* 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); |
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 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.
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 catch, we may not catch more of these until we get into integration testing.
We can use toMillis(), thanks!
9be0aad to
d15fc94
Compare
…etGetOptions...) (#1385) * Introduce StorageArbitraries to contain common arbitraries which aren't globally registered by type. Co-authored-by: BenWhitehead <BenWhitehead@users.noreply.github.com>
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:
Fixes #<issue_number_goes_here> ☕️
If you write sample code, please follow the samples format.