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

compute: call compute package error #4377

Closed
wanglong001 opened this issue Jul 5, 2021 · 6 comments
Closed

compute: call compute package error #4377

wanglong001 opened this issue Jul 5, 2021 · 6 comments
Assignees
Labels
api: compute Issues related to the Compute Engine API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@wanglong001
Copy link

Client
cloud.google.com/go v0.86.0
compute
Environment
image

Go Environment
$ go version
go version go1.16.5 darwin/amd64
$ go env
GO111MODULE="auto"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/wangzelong/Library/Caches/go-build"
GOENV="/Users/wangzelong/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/wangzelong/go/pkg/mod"
GOOS="darwin"
GOPATH="/Users/wangzelong/go"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.16.5"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/p5/x22xctmd4fx7wc31mcgkw96h0000gn/T/go-build883774571=/tmp/go-build -gno-record-gcc-switches -fno-common"
Code

e.g.

reqs := &computepb.ListRegionsRequest{Project: "psyched-subset-161702"}
cli, _ := compute.NewRegionsRESTClient(context.Background(), option.WithCredentialsJSON([]byte(CRED_JSON)))
a, err := cli.List(context.TODO(), reqs)
fmt.Println(a, err)

return

<nil> Get "compute.googleapis.com/compute/v1/projects/psyched-subset-161702/regions": unsupported protocol scheme 
reqs := &computepb.ListRegionsRequest{Project: "psyched-subset-161702"}
cli, _ := compute.NewRegionsRESTClient(context.Background(), option.WithCredentialsJSON([]byte(CRED_JSON)), option.WithEndpoint("https://compute.googleapis.com/"))
a, err := cli.List(context.TODO(), reqs)
fmt.Println(a, err)

return

<nil> Get "https://compute.googleapis.com//compute/v1/projects/psyched-subset-161702/regions": stream error: stream ID 1; INTERNAL_ERROR

@wanglong001 wanglong001 added the triage me I really want to be triaged. label Jul 5, 2021
@wanglong001 wanglong001 changed the title packagename: short description of bug call compute package error Jul 5, 2021
@wanglong001
Copy link
Author

wanglong001 commented Jul 5, 2021

@noahdietz pls, help me fix it

#4364

@wanglong001 wanglong001 changed the title call compute package error compute: call compute package error Jul 5, 2021
@product-auto-label product-auto-label bot added the api: compute Issues related to the Compute Engine API. label Jul 5, 2021
@noahdietz
Copy link
Contributor

noahdietz commented Jul 7, 2021

Hi there, apologies, this client was launched in alpha and still had some bugs. The fixes are pending and will come soon. Thanks.

cc: @vchudnov-g @codyoss

@wanglong001
Copy link
Author

wanglong001 commented Jul 7, 2021

@noahdietz
Hi, I want to know the difference between these two repo

this repo and https://github.com/googleapis/google-api-go-client

@codyoss
Copy link
Member

codyoss commented Jul 7, 2021

@noahdietz Maybe we should create a tracking bug with all known issues with the client so that people that are using the library can see what work is in progress still.

@codyoss codyoss added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed triage me I really want to be triaged. labels Jul 7, 2021
@codyoss codyoss self-assigned this Jul 7, 2021
@noahdietz
Copy link
Contributor

Tracking bug: #4380

@codyoss
Copy link
Member

codyoss commented Jul 7, 2021

@wanglong001 Thanks for the report, I am going to close this issue in favor of the one linked above.

@codyoss codyoss closed this as completed Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: compute Issues related to the Compute Engine API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants