Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

chore(testproxy): Mutate rows bug fix#1234

Merged
danieljbruce merged 9 commits intogoogleapis:mainfrom
danieljbruce:mutate-rows-bug-fix
Feb 16, 2023
Merged

chore(testproxy): Mutate rows bug fix#1234
danieljbruce merged 9 commits intogoogleapis:mainfrom
danieljbruce:mutate-rows-bug-fix

Conversation

@danieljbruce
Copy link
Copy Markdown
Contributor

@danieljbruce danieljbruce commented Feb 7, 2023

This PR makes a change to the test proxy that allows the test proxy to use the veneer layer instead to make its call to mutateRows. Using the veneer layer to make the call allows additional parsing to be done on the request and the results which ensures the right results are returned to the test runner enabling the test runner to pass its test.

The test in question is TestMutateRows_NoRetry_NonTransientErrors.

Changed the test proxy functionality to match what is in the veneer layer and now the test case in question passes with a slight change in the grpc code returned.
This commit just permits a more concise expression for the entries that should be returned back to the test runner.
@danieljbruce danieljbruce requested review from a team February 7, 2023 15:13
@product-auto-label product-auto-label Bot added size: m Pull request size is medium. api: bigtable Issues related to the googleapis/nodejs-bigtable API. labels Feb 7, 2023
Comment on lines +40 to +47
if (error.name === 'PartialFailureError') {
return {
status: {code: grpc.status.OK, message: error.message},
entry: Array.from(error.errors.entries()).map(([index, entry]) => ({
index: index + 1,
status: entry,
})),
};
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.

why is the proxy turning partial failures into an "OK" response here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It meets the needs of the test case and is required for the test case to pass, but this is a good start to a discussion about what the test proxy should do.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Maybe

callback(new PartialFailureError(mutationErrors, err));
should change, but then we have a breaking change?

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.

We shouldn't change the node js client.

You can return the status as is, just ensure the entries are filled correctly. I will update the test case as well as the guide of test proxy writeup.

The test proxy uses a new test path now so these adjustments must be made to work with the test runner properly.
As per the online discussion, we should simply pass along the error as is so that the corresponding error message and status can be reported.
Copy link
Copy Markdown
Contributor

@ruyadorno ruyadorno left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@danieljbruce danieljbruce added the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 16, 2023
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 16, 2023
@danieljbruce danieljbruce merged commit 0e86083 into googleapis:main Feb 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigtable Issues related to the googleapis/nodejs-bigtable API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants