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

[DRAFT] chore: update conformance tests #1055

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/conformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
test-version: [ "v0.0.2" ]
test-version: [ "v0.0.3" ]
py-version: [ 3.8 ]
client-type: [ "async", "sync", "legacy" ]
client-type: [ "async", "sync" ]
include:
- client-type: "sync"
# sync client does not support concurrent streams
test_args: "-skip _Generic_MultiStream"
- client-type: "legacy"
# legacy client is synchronous and does not support concurrent streams
# legacy client does not expose mutate_row. Disable those tests
test_args: "-skip _Generic_MultiStream -skip TestMutateRow_"
fail-fast: false
name: "${{ matrix.client-type }} client / python ${{ matrix.py-version }} / test tag ${{ matrix.test-version }}"
steps:
Expand Down
6 changes: 1 addition & 5 deletions test_proxy/handlers/grpc_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,7 @@ def BulkMutateRows(self, request, context, client_response=None):
entries = []
if isinstance(client_response, dict) and "error" in client_response:
entries = [bigtable_pb2.MutateRowsResponse.Entry(index=exc_dict.get("index",1), status=Status(code=exc_dict.get("code", 5))) for exc_dict in client_response.get("subexceptions", [])]
if not entries:
# only return failure on the overall request if there are failed entries
status = Status(code=client_response.get("code", 5), message=client_response["error"])
# TODO: protos were updated. entry is now entries: https://github.com/googleapis/cndb-client-testing-protos/commit/e6205a2bba04acc10d12421a1402870b4a525fb3
status = Status(code=client_response.get("code", 5), message=client_response["error"])
response = test_proxy_pb2.MutateRowsResult(status=status, entry=entries)
return response

Expand Down Expand Up @@ -144,5 +141,4 @@ def SampleRowKeys(self, request, context, client_response=None):
else:
for sample in client_response:
sample_list.append(bigtable_pb2.SampleRowKeysResponse(offset_bytes=sample[1], row_key=sample[0]))
# TODO: protos were updated. sample is now samples: https://github.com/googleapis/cndb-client-testing-protos/commit/e6205a2bba04acc10d12421a1402870b4a525fb3
return test_proxy_pb2.SampleRowKeysResult(status=status, sample=sample_list)
Loading