Skip to content

feat(bigtable): Rerouted DirectRow.commit to use mutate_row - #18191

Draft
daniel-sanche wants to merge 3 commits into
shim/06-conditional-mutationsfrom
shim/07-direct-row-commit
Draft

feat(bigtable): Rerouted DirectRow.commit to use mutate_row#18191
daniel-sanche wants to merge 3 commits into
shim/06-conditional-mutationsfrom
shim/07-direct-row-commit

Conversation

@daniel-sanche

Copy link
Copy Markdown
Contributor

Migrating over @gkevinzheng PR from bigtable monorepo googleapis/python-bigtable#1276

Original description:

Changes Made:

  • Use MutateRow instead of MutateRows for DirectRow.commit instead of Table.MutateRows
  • Added system test for DirectRow.commit because of the decoupling of DirectRow.commit and Table.MutateRows
  • Adjusted input error system test because of slight changes in error behavior
  • Adjusted unit tests for DirectRow.commit

Note to reviewers: This PR has already been reviewed and merged to a staging branch, with the intention of doing a single merge to main. We are now planning to slowly rollout these changes back to the main branch. Minimal re-review should be necessary

gkevinzheng and others added 3 commits August 21, 2026 12:31
**Changes Made:**

- Use MutateRow instead of MutateRows for DirectRow.commit instead of
Table.MutateRows
- Added system test for DirectRow.commit because of the decoupling of
DirectRow.commit and Table.MutateRows
- Adjusted input error system test because of slight changes in error
behavior
- Adjusted unit tests for DirectRow.commit
@daniel-sanche
daniel-sanche requested a review from a team as a code owner August 21, 2026 19:38
@daniel-sanche daniel-sanche changed the title Shim/07 direct row commit feat(bigtable): Rerouted DirectRow.commit to data client Aug 21, 2026
@daniel-sanche daniel-sanche changed the title feat(bigtable): Rerouted DirectRow.commit to data client feat(bigtable): Rerouted DirectRow.commit to use mutate_row Aug 21, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the commit method in the Row class to use the direct mutate_row API call instead of mutate_rows. It updates error handling to catch GoogleAPICallError and map it to a Status object, while raising a ValueError if no mutations are present. System and unit tests are updated and added to verify these changes. A review comment points out that GoogleAPICallError does not have a details attribute, which would cause an AttributeError at runtime, and suggests using getattr as a safe fallback.

Comment thread packages/google-cloud-bigtable/google/cloud/bigtable/row.py
@daniel-sanche
daniel-sanche marked this pull request as draft August 21, 2026 20:44
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.

2 participants