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

Updating Bigtable stub creation to work with emulator. #2249

Merged
merged 1 commit into from
Sep 8, 2016

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented Sep 6, 2016

System test will be updated soon, once some issues with the emulator are worked out.


Message was previously:

Currently does not work as-is since most of the methods (most notable row.commit()) result in UNAVAILABLE from the backend.


Towards #2242.

/cc @garye Could you check out this branch and run tox -e bigtable-emulator to see the failures?

NOTE: Has #2245 as diffbase.

@dhermes dhermes added testing api: bigtable Issues related to the Bigtable API. labels Sep 6, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 6, 2016
@garye
Copy link
Contributor

garye commented Sep 6, 2016

I'll take a look

@dhermes
Copy link
Contributor Author

dhermes commented Sep 6, 2016

Thanks!

@dhermes
Copy link
Contributor Author

dhermes commented Sep 6, 2016

@garye I should note that only the last commit is germane to this PR, the rest are for the two diffbase PRs.

@dhermes
Copy link
Contributor Author

dhermes commented Sep 6, 2016

@garye I have found the start of a culprit. Some operations accidentally kill the server, causing all subsequent operations to fail. Also the example stack trace refers to a path not on my machine (/usr/local/google/home/garyelliott)

$ gcloud beta emulators bigtable start
Executing: /home/dhermes/google-cloud-sdk/platform/bigtable-emulator/cbtemulator --host=localhost --port=8645
[bigtable] Cloud Bigtable emulator running on 127.0.0.1:8645
[bigtable] panic: runtime error: invalid memory address or nil pointer dereference
[bigtable] [signal 0xb code=0x1 addr=0x48 pc=0x4888c8]
[bigtable] 
[bigtable] goroutine 16 [running]:
[bigtable] panic(0x9348a0, 0xc820010130)
[bigtable]      /usr/local/google/home/garyelliott/dl_go/go/src/runtime/panic.go:481 +0x3e6
[bigtable] cloud.google.com/go/bigtable/bttest.(*server).SampleRowKeys(0xc820013a00, 0xc8201b0c10, 0x7f4c92733130, 0xc8201b0c40, 0x0, 0x0)
[bigtable]      <autogenerated>:3 +0x78
[bigtable] google.golang.org/genproto/googleapis/bigtable/v2._Bigtable_SampleRowKeys_Handler(0x9c5360, 0xc820013a00, 0x7f4c92733098, 0xc8200842d0, 0x0, 0x0)
[bigtable]      /usr/local/google/home/garyelliott/go/src/google.golang.org/genproto/googleapis/bigtable/v2/bigtable.pb.go:817 +0x175
[bigtable] google.golang.org/grpc.(*Server).processStreamingRPC(0xc820017900, 0x7f4c926e7200, 0xc820084240, 0xc8201e23c0, 0xc8201754a0, 0xcf9d80, 0xc8201f68d0, 0x0, 0x0)
[bigtable]      /usr/local/google/home/garyelliott/go/src/google.golang.org/grpc/server.go:686 +0x489
[bigtable] google.golang.org/grpc.(*Server).handleStream(0xc820017900, 0x7f4c926e7200, 0xc820084240, 0xc8201e23c0, 0xc8201f68d0)
[bigtable]      /usr/local/google/home/garyelliott/go/src/google.golang.org/grpc/server.go:770 +0x1151
[bigtable] google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc8201b0ac0, 0xc820017900, 0x7f4c926e7200, 0xc820084240, 0xc8201e23c0)
[bigtable]      /usr/local/google/home/garyelliott/go/src/google.golang.org/grpc/server.go:419 +0xa0
[bigtable] created by google.golang.org/grpc.(*Server).serveStreams.func1
[bigtable]      /usr/local/google/home/garyelliott/go/src/google.golang.org/grpc/server.go:420 +0x9a

@tseaver
Copy link
Contributor

tseaver commented Sep 7, 2016

@dhermes needs rebasing.

@tseaver
Copy link
Contributor

tseaver commented Sep 8, 2016

PEP8 failure

instances, failed_locations = retry(Config.CLIENT.list_instances)()

if len(failed_locations) != 0:
raise ValueError('List instances failed in module set up.')

This comment was marked as spam.

This comment was marked as spam.

@tseaver
Copy link
Contributor

tseaver commented Sep 8, 2016

Would it be simpler to wrap the instance admin / table admin testsuite classes in @unittest.skipIf(IN_EMULATOR)?

@dhermes
Copy link
Contributor Author

dhermes commented Sep 8, 2016

Would it be simpler to wrap the instance admin / table admin testsuite classes in @unittest.skipIf(IN_EMULATOR)?

The problem is that IN_EMULATOR is not known at import time, since setting the env. var. happens in Python (via run_emulator.py).

@dhermes dhermes changed the title Updating Bigtable system test to work with emulator. Updating Bigtable stub creation to work with emulator. Sep 8, 2016
System test will be updated soon, once some issues with
the emulator are worked out.
@dhermes
Copy link
Contributor Author

dhermes commented Sep 8, 2016

FWIW the AppVeyor check has been deleted (was created when messing around trying to create https://ci.appveyor.com/project/GoogleCloudPlatform/google-cloud-python/)

@dhermes
Copy link
Contributor Author

dhermes commented Sep 8, 2016

@tseaver PTAL

@tseaver
Copy link
Contributor

tseaver commented Sep 8, 2016

LGTM

@dhermes dhermes merged commit 1137e6a into googleapis:master Sep 8, 2016
@dhermes dhermes deleted the add-bigtable-emulator branch September 8, 2016 18:02
@dhermes dhermes mentioned this pull request Sep 19, 2016
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 Bigtable API. cla: yes This human has signed the Contributor License Agreement. testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants