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

bigtable: loadtest and scantest cannot import a go program cbt #6124

Closed
Capstan opened this issue Jun 3, 2022 · 8 comments
Closed

bigtable: loadtest and scantest cannot import a go program cbt #6124

Capstan opened this issue Jun 3, 2022 · 8 comments
Assignees
Labels
api: bigtable Issues related to the Bigtable API. type: cleanup An internal cleanup or hygiene concern.

Comments

@Capstan
Copy link

Capstan commented Jun 3, 2022

Client

bigtable

Environment

any; tested here on Debian linux

Go Environment

$ go version
go version go1.19-pre2 cl/451353751 +37eae7ce94 linux/amd64
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/usr/local/google/home/nherring/.cache/go-build"
GOENV="/usr/local/google/home/nherring/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/usr/local/google/home/nherring/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/usr/local/google/home/nherring/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/google-golang"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/google-golang/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19-pre2 cl/451353751 +37eae7ce94"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build434925960=/tmp/go-build -gno-record-gcc-switches"

Code

import "cloud.google.com/go/cbt"

Expected behavior

$ go install cloud.google.com/go/bigtable/cmd/loadtest@main succeeds.

Actual behavior

$ go install cloud.google.com/go/bigtable/cmd/loadtest@main
go/pkg/mod/cloud.google.com/go/[email protected]/cmd/loadtest/loadtest.go:37:2: import "cloud.google.com/go/cbt" is a program, not an importable package

Additional context

After cbt was broken out into its own separate repo, the imports were refactored, but they do not work because cbt is no longer a package.

@Capstan Capstan added the triage me I really want to be triaged. label Jun 3, 2022
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the Bigtable API. label Jun 3, 2022
@Capstan
Copy link
Author

Capstan commented Jun 3, 2022

/cc @codyoss @lfolger @chressie

@telpirion
Copy link
Contributor

That's not good! Let me take a quick look.

@telpirion
Copy link
Contributor

Hmm, we'll need to look at this a bit more deeply. Try go install cloud.google.com/go/bigtable/cmd/loadtest@latest -- that seems to be working for me.

@chressie
Copy link

chressie commented Jun 3, 2022

You should be able to repro this with go install cloud.google.com/go/bigtable/cmd/loadtest@main, which will use the latest commit on the main branch.

@telpirion
Copy link
Contributor

@chressie I'm able to repro this issue without any problem (thank you for the tip, though!). I think the fix here is to export the Config logic from cbt that loadtest and scantest rely on. I'll create an issue in the cbt repo to track this work.

@enocom
Copy link
Member

enocom commented Jun 3, 2022

Here's a workaround in the meantime:

go install cloud.google.com/go/bigtable/cmd/loadtest@8cdfe257d52cfeab60daec1be67f5fb9075077d6

@Capstan
Copy link
Author

Capstan commented Jun 3, 2022

@telpirion I'm trying to import cbt into the monorepo and due to the one-version rule, having both that Config and the older bigtable's cbt's Config around simultaneously would violate it. The go install was just a short repro of the issue I'm having while trying to wire it up internally. So I'll wait until there's a cbt that will work for both and/or changes to loadtest or scantest I can apply as a temporary patch.

@telpirion telpirion added type: cleanup An internal cleanup or hygiene concern. and removed triage me I really want to be triaged. labels Jun 7, 2022
@telpirion
Copy link
Contributor

Closing this issue as it has been resolved internally.

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. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

4 participants