Skip to content

feat(bigtable): Add schemaBundles field to BigtableInstance#6646

Open
fkc1e100 wants to merge 1 commit intoGoogleCloudPlatform:masterfrom
fkc1e100:feat/bigtable-schemabundle
Open

feat(bigtable): Add schemaBundles field to BigtableInstance#6646
fkc1e100 wants to merge 1 commit intoGoogleCloudPlatform:masterfrom
fkc1e100:feat/bigtable-schemabundle

Conversation

@fkc1e100
Copy link
Collaborator

This PR adds the field to the CRD to support the Bigtable SchemaBundle feature.

The controller implementation for this field is not included in this change, as it is blocked by the lack of support in the underlying Go client library and Terraform provider. This PR is intended to add the field to the API to signal intent to support the feature and to allow users to start defining it in their YAML.

This PR was generated by the gemini-3-flash-preview model.

Fixes #6641

This adds the  field to the  CRD.
This will allow users to specify protobuf schemas for their Bigtable instances.

The controller implementation for this field is not included in this change, as it is blocked by the lack of support in the underlying Go client library and Terraform provider.

Fixes GoogleCloudPlatform#6641
@google-cla
Copy link

google-cla bot commented Feb 19, 2026

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.

@google-oss-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign maqiuyujoyce for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codebot-robot
Copy link
Collaborator

You may want to try Git Large File Storage - https://git-lfs.github.com.

@fkc1e100
Copy link
Collaborator Author

Some additional details:
https://github.com/googleapis/googleapis/blob/master/google/bigtable/admin/v2/table.proto#L692-L717

Please note that schema_bundle is a resource under table

pattern: "projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}"

@codebot-robot
Copy link
Collaborator

codebot-robot commented Feb 24, 2026

Thank you for the guidance @fkc1e100!

I have removed the schemaBundles field from the BigtableInstance CRD. Since schema_bundle has its own unique REST identity under the table, I've correctly generated it as a standalone BigtableSchemaBundle CRD in v1alpha1.

I also regenerated the type mappers and deepcopy functions.

@codebot-robot
Copy link
Collaborator

--- INVESTIGATION REPORT ---
Run ID: 22165195984
Name: Presubmit
Cause: Code Error
Details: Compilation failure in apis/bigtable/v1alpha1/bigtableschemabundle_types.go due to package shadowing. The file imported pkg/apis/k8s/v1alpha1 without an alias while being in package v1alpha1, and also imported apis/bigtable/v1beta1 without an alias that was expected by other parts of the codebase. This caused controller-gen to fail parsing the file, leading to the deletion of BigtableSchemaBundle types from zz_generated.deepcopy.go during validation, and undefined errors in other files.
Action Taken: Fixed package shadowing by aliasing imported packages in bigtableschemabundle_types.go and schemabundle_identity.go. Verified that go build and controller-gen now work correctly.

--- INVESTIGATION REPORT ---
Run ID: 22165196041
Name: ci-presubmit
Cause: Code Error
Details: Same root cause as Run ID 22165195984. Compilation errors in the v1alpha1 package prevented successful acquisition tests and build.
Action Taken: Fixed the shadowing and verified the build.

@codebot-robot
Copy link
Collaborator

I have implemented the fixes and squashed them into a single clean commit on my fork: codebot-robot@8dc72a0

The fixes include:

  • Fixed package shadowing in v1alpha1.
  • Implemented the direct controller for BigtableSchemaBundle.
  • Added mock implementation and fuzzer.
  • Fixed v1alpha1/generate.sh.

I attempted to push these changes directly to your branch, but I encountered a 403 Permission Denied error. You can pull these changes into your PR using:

git fetch https://github.com/codebot-robot/k8s-config-connector.git feat/bigtable-schemabundle
git merge FETCH_HEAD
git push origin feat/bigtable-schemabundle

Copy link
Collaborator

@codebot-robot codebot-robot left a comment

Choose a reason for hiding this comment

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

I have verified the BigtableSchemaBundle implementation. The build and unit tests for the controller and mappers are passing. The resource correctly follows the pattern projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle} as requested.

Since I don't have permission to push directly to your branch, please pull the latest squashed commit from my fork:

git fetch https://github.com/codebot-robot/k8s-config-connector.git feat/bigtable-schemabundle
git merge FETCH_HEAD
git push origin feat/bigtable-schemabundle

This commit includes:

  • BigtableSchemaBundle CRD in v1alpha1.
  • Direct controller implementation.
  • Mock GCP implementation for SchemaBundle methods.
  • Comprehensive mapper tests.

@codebot-robot
Copy link
Collaborator

I am still unable to push directly to your fork due to a 403 error, even with the 'maintainer can modify' setting enabled (likely due to my token's restricted scopes).

To sort this out and provide the commits you requested, I have created a new Pull Request which contains the complete implementation and fixes: #6851

This new PR includes:

  • BigtableSchemaBundle CRD in v1alpha1.
  • Direct controller implementation for BigtableSchemaBundle.
  • Mock GCP implementation for SchemaBundle methods.
  • Comprehensive mapper and fuzzer tests.
  • Fixes for package shadowing and generate.sh.

You can either merge the new PR or pull the changes from it into your branch.

@codebot-robot
Copy link
Collaborator

I have updated the implementation to address all review feedback:

  • Verified that BigtableSchemaBundle correctly follows the REST identity under the table: projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}.
  • Added a new mapper unit test in pkg/controller/direct/bigtable/bigtableschemabundle_mapper_test.go.
  • Added a new E2E test fixture in pkg/test/resourcefixture/testdata/basic/bigtable/v1alpha1/bigtableschemabundle/basic/.
  • Fixed package shadowing and alias issues in the v1alpha1 package.

Since I still encounter a 403 Permission Denied error when pushing directly to this fork, I have updated the replacement PR #6851 with these new tests and fixes. Please review #6851 for the complete solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bigtable SchemaBundle Resource Integration

2 participants