Skip to content

Updating Bigtable stub creation to work with emulator. - #2249

Merged
dhermes merged 1 commit into
googleapis:masterfrom
dhermes:add-bigtable-emulator
Sep 8, 2016
Merged

Updating Bigtable stub creation to work with emulator.#2249
dhermes merged 1 commit into
googleapis:masterfrom
dhermes:add-bigtable-emulator

Conversation

@dhermes

@dhermesdhermes commented Sep 6, 2016

Copy link
Copy Markdown
Contributor

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.

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

garye commented Sep 6, 2016

Copy link
Copy Markdown
Contributor

I'll take a look

@dhermes

Copy link
Copy Markdown
ContributorAuthor

Thanks!

@dhermes

Copy link
Copy Markdown
ContributorAuthor

@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
Copy Markdown
ContributorAuthor

@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
Copy Markdown
Contributor

@dhermes needs rebasing.

@dhermes
dhermesforce-pushed the add-bigtable-emulator branch from 49c6e7c to 5000ac6CompareSeptember 7, 2016 23:07
@tseaver

Copy link
Copy Markdown
Contributor

PEP8 failure

Comment threadsystem_tests/bigtable.py Outdated
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
Copy Markdown
Contributor

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

@dhermes

Copy link
Copy Markdown
ContributorAuthor

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
dhermesforce-pushed the add-bigtable-emulator branch from 5000ac6 to 191c042CompareSeptember 8, 2016 02:14
@dhermesdhermes 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
dhermesforce-pushed the add-bigtable-emulator branch from 191c042 to 4191ebfCompareSeptember 8, 2016 03:04
@dhermes

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

@tseaver PTAL

@tseaver

Copy link
Copy Markdown
Contributor

LGTM

@dhermes
dhermes merged commit 1137e6a into googleapis:masterSep 8, 2016
@dhermes
dhermes deleted the add-bigtable-emulator branch September 8, 2016 18:02
@dhermesdhermes mentioned this pull request Sep 19, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtableIssues related to the Bigtable API.cla: yesThis human has signed the Contributor License Agreement.testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@dhermes@garye@tseaver@googlebot