Skip to content

Conversation

ron-gal
Copy link
Contributor

@ron-gal ron-gal commented Jul 2, 2025

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.

@product-auto-label product-auto-label bot added size: l Pull request size is large. api: bigtable Issues related to the googleapis/java-bigtable API. labels Jul 2, 2025
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. and removed size: l Pull request size is large. labels Jul 2, 2025
@ron-gal ron-gal marked this pull request as ready for review July 2, 2025 20:39
@ron-gal ron-gal requested review from a team as code owners July 2, 2025 20:39
@ron-gal
Copy link
Contributor Author

ron-gal commented Jul 7, 2025

/gcbrun

@andre-sampaio andre-sampaio added kokoro:run Add this label to force Kokoro to re-run the tests. and removed kokoro:run Add this label to force Kokoro to re-run the tests. labels Jul 7, 2025
@andre-sampaio andre-sampaio added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 7, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 7, 2025
*
* @see SchemaBundleType for details.
*/
public CreateSchemaBundleRequest setProtoSchema(@Nonnull String protoSchemaFile)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it ever valid for a request not to have a protoSchema set? Otherwise we may want to either make it a required argument for creating a CreateSchemaBundleRequest or validate it before converting it to proto

It also feels like requiring a file path is overly restrictive (what if the file is on gcs / some database / etc). Can we accept a string and provide a utility method to read from a file instead if we think that's important (e.g. setProtoSchemaFromFile(Path file))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do the same for views and their queries, so I don't think we want to move the protoSchemaFile to the ctor, for consistency.

We could support accept the file contents as byte array, and have the caller get these bytes from anywhere.

/** Gets the schema bundle's id. */
public String getId() {
// Constructor ensures that name is not null.
SchemaBundleName fullName = SchemaBundleName.parse(proto.getName());
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: we can store the parsed SchemaBundleName as an instance member in the constructor

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

}

/** Changes the deletion protection of an existing schema bundle. */
public UpdateSchemaBundleRequest setProtoSchema(String protoSchemaFile) throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as from CreateSchemaBundleRequest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same answer :)

@ron-gal ron-gal requested a review from andre-sampaio July 8, 2025 19:43
andre-sampaio
andre-sampaio previously approved these changes Jul 8, 2025
@andre-sampaio andre-sampaio added kokoro:run Add this label to force Kokoro to re-run the tests. automerge Merge the pull request once unit tests and other checks pass. labels Jul 8, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Jul 8, 2025
@ron-gal ron-gal requested a review from andre-sampaio July 8, 2025 21:16
@andre-sampaio andre-sampaio merged commit 7d7b9a9 into googleapis:main Jul 9, 2025
23 of 24 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 Jul 9, 2025
@ron-gal ron-gal deleted the schema_bundles branch July 9, 2025 13:54
gcf-merge-on-green bot pushed a commit that referenced this pull request Jul 16, 2025
nicholsl pushed a commit to nicholsl/java-bigtable that referenced this pull request Jul 16, 2025
* feat(bigtable): Add schema bundle support * minor fix * fix format * add tests * add tests * handled file * added files * fix format * fix files * fix comment * fix * fix test * fix test * fix test * fix more tests * fix more tests * fix more tests * fix more tests * fix more tests * use separate tables for tests * use separate tables for tests * use separate tables for tests * update according to PR * update according to PR * update according to PR * Update UpdateSchemaBundleRequest.java * fix build
nicholsl pushed a commit to nicholsl/java-bigtable that referenced this pull request Jul 16, 2025
🤖 I have created a release *beep* *boop* --- ## [2.62.0](https://togithub.com/googleapis/java-bigtable/compare/v2.61.0...v2.62.0) (2025-07-15) ### Features * Add Idempotency to Cloud Bigtable MutateRowRequest API ([b5acca6](https://togithub.com/googleapis/java-bigtable/commit/b5acca6ac4f1eec420adb27bc77aa1bda0ec2dca)) * Add SchemaBundles API ([b5acca6](https://togithub.com/googleapis/java-bigtable/commit/b5acca6ac4f1eec420adb27bc77aa1bda0ec2dca)) * **bigtable:** Add schema bundle support ([googleapis#2619](https://togithub.com/googleapis/java-bigtable/issues/2619)) ([7d7b9a9](https://togithub.com/googleapis/java-bigtable/commit/7d7b9a966d3ef7b7a0ef3f82038ab73f4d791427)) * Next release from main branch is 2.62.0 ([googleapis#2621](https://togithub.com/googleapis/java-bigtable/issues/2621)) ([202b211](https://togithub.com/googleapis/java-bigtable/commit/202b21102e71da71ff56f19a12d8a00a59cd8107)) ### Dependencies * Minor cleanup ([googleapis#2623](https://togithub.com/googleapis/java-bigtable/issues/2623)) ([7b230e8](https://togithub.com/googleapis/java-bigtable/commit/7b230e86902b5733c06e45fad90da76653ee1096)) * Update shared dependencies ([googleapis#2616](https://togithub.com/googleapis/java-bigtable/issues/2616)) ([eb7cfd5](https://togithub.com/googleapis/java-bigtable/commit/eb7cfd526aa999c614b7b8285d32759e2739ff9a)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
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: xl Pull request size is extra large.

3 participants