Skip to content
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: Add RPO metadata settings #1105

Merged
merged 8 commits into from Jan 12, 2022
Merged

feat: Add RPO metadata settings #1105

merged 8 commits into from Jan 12, 2022

Conversation

JesseLovelace
Copy link
Contributor

@JesseLovelace JesseLovelace commented Oct 13, 2021

Adds RPO metadata settings for buckets.

Holding off on adding documentation until this general implementation is approved

See googleapis/google-cloud-java#7700
Fixes: #1106

@JesseLovelace JesseLovelace requested review from a team as code owners October 13, 2021 20:57
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/java-storage API. label Oct 13, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 13, 2021
@JesseLovelace JesseLovelace changed the title (feat) Add RPO metadata settings (feat): Add RPO metadata settings Oct 13, 2021
@JesseLovelace JesseLovelace changed the title (feat): Add RPO metadata settings feat: Add RPO metadata settings Oct 13, 2021
Copy link

@ddelgrosso1 ddelgrosso1 left a comment

Choose a reason for hiding this comment

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

You probably want someone a bit more versed in Java to take a look but to me this is 👍

@@ -54,34 +54,16 @@
import com.google.cloud.kms.v1.KeyManagementServiceGrpc.KeyManagementServiceBlockingStub;
import com.google.cloud.kms.v1.KeyRingName;
import com.google.cloud.kms.v1.LocationName;
import com.google.cloud.storage.Acl;
import com.google.cloud.storage.*;
Copy link
Member

Choose a reason for hiding this comment

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

Revert this change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

intellij does this automatically and i can't figure out how to turn it off it's infuriating 😭

Copy link
Member

Choose a reason for hiding this comment

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

@@ -21,6 +21,11 @@
<method>com.google.cloud.storage.BucketInfo$Builder deleteLifecycleRules()</method>
<differenceType>7013</differenceType>
</difference>
<difference>
Copy link
Member

Choose a reason for hiding this comment

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

@BenWhitehead we hit this each time we make a change to a public interface, we've been told it's to protect us from breaking changes, however we are committing breaking changes. It has gone on for years. What are your thoughts on this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Clirr is in place to primarily help us know if we are committing a change that breaks binary compatibility. The place it's most beneficial is on our generated code and our "main" apis. In this case, it's less beneficial and unfortunately BucketInfo.Builder is abstract and not annotated with @InternalExtensionOnly which would give us leeway to add methods with no guarantee of binary compatibility for out of project implementations. However, adding this annotation is itself considered a breaking change and would need to be performed at a major version.

Our policy for model classes in general has been that we consider them to generally be safe for adding new methods, unfortunately clirr isn't capable of being made aware that this is a model class and instead requires an entry defined. Unfortunately, at this point, I think we're sort of stuck having to deal with this file until either we reach a new major version when we can annotate this builder and define a general rule or we decide to refactor things and make this class not be abstract and instead simply non-final.

Copy link
Member

@frankyn frankyn left a comment

Choose a reason for hiding this comment

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

LGTM unless @BenWhitehead has any additional comments!

@@ -21,6 +21,11 @@
<method>com.google.cloud.storage.BucketInfo$Builder deleteLifecycleRules()</method>
<differenceType>7013</differenceType>
</difference>
<difference>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Clirr is in place to primarily help us know if we are committing a change that breaks binary compatibility. The place it's most beneficial is on our generated code and our "main" apis. In this case, it's less beneficial and unfortunately BucketInfo.Builder is abstract and not annotated with @InternalExtensionOnly which would give us leeway to add methods with no guarantee of binary compatibility for out of project implementations. However, adding this annotation is itself considered a breaking change and would need to be performed at a major version.

Our policy for model classes in general has been that we consider them to generally be safe for adding new methods, unfortunately clirr isn't capable of being made aware that this is a model class and instead requires an entry defined. Unfortunately, at this point, I think we're sort of stuck having to deal with this file until either we reach a new major version when we can annotate this builder and define a general rule or we decide to refactor things and make this class not be abstract and instead simply non-final.

Co-authored-by: BenWhitehead <BenWhitehead@users.noreply.github.com>
@BenWhitehead BenWhitehead added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 25, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 25, 2021
@JesseLovelace JesseLovelace added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 4, 2021
@JesseLovelace JesseLovelace removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jan 12, 2022
@JesseLovelace JesseLovelace merged commit 6f9dfdf into main Jan 12, 2022
@JesseLovelace JesseLovelace deleted the turborep branch January 12, 2022 20:56
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. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for turbo replication
5 participants