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 support for table deletion protection #2430

Merged
merged 7 commits into from
Nov 25, 2024

Conversation

adashyan
Copy link
Contributor

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)
  • Rollback plan is reviewed and LGTMed
  • All new data plane features have a completed end to end testing plan

Fixes #<issue_number_goes_here> ☕️

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

@adashyan adashyan requested review from a team as code owners November 21, 2024 02:59
Copy link

google-cla bot commented Nov 21, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigtable Issues related to the googleapis/java-bigtable API. labels Nov 21, 2024
@adashyan adashyan changed the title add support for table deletion protection feat: add support for table deletion protection Nov 21, 2024
@mutianf mutianf added the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 22, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 22, 2024
@@ -172,6 +176,10 @@ public Duration getChangeStreamRetention() {
return changeStreamRetention;
}

public boolean isProtected() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a comment: /** Returns whether this table is deletion protected. */
and rename it to isDeletionProtected to be consistent with authorized view

@@ -88,11 +95,11 @@ public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof UpdateTableRequest)) return false;
UpdateTableRequest that = (UpdateTableRequest) o;
return Objects.equals(requestBuilder, that.requestBuilder);
return Objects.equals(requestBuilder.build(), that.requestBuilder.build());
Copy link
Contributor

Choose a reason for hiding this comment

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

why changing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can remove it but that's what we do in other like CreateTableRequest

}

@Override
public int hashCode() {
return Objects.hash(requestBuilder);
return Objects.hash(requestBuilder.build());
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, why changing this?

@mutianf mutianf added the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 22, 2024
@mutianf
Copy link
Contributor

mutianf commented Nov 22, 2024

/gcbrun

@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 22, 2024
@mutianf mutianf added the automerge Merge the pull request once unit tests and other checks pass. label Nov 22, 2024
@mutianf mutianf merged commit 687b6df into googleapis:main Nov 25, 2024
21 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Nov 25, 2024
@adashyan adashyan deleted the table_deletion_protection branch November 25, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/java-bigtable API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants