Closed agius closed 6 years ago
Np. Btw I see you are struggling with with forking go projects and as result had to use relative imports. We all been there. Here is a better way:
optiopay/klar
)optiopay/klar
) to your GOPATH
fork
, use any name you like: git remote add fork https://github.com/agius/klar
git remote -v
git push fork my-branch
, also you can always pull changes from the origin
to keep you fork up to date.
Hope it helps!@hashmap w00t, thanks for the tips! My situation was a bit more complicated, since I was trying to get this to run in a Docker container and working locally with Clair via docker-compose
.
My Dockerfile
for klar
would clone my fork & branch, but it would still require me to go get
this repo, and go build
was still using the Timeout configuration from here instead of on my branch.
I tried changing all the imports to github.com/agius/klar/etc
, but it was still downloading & using optiopay/klar
for reasons I couldn't figure out.
And then I started getting this:
clair/api.go:64: cannot use conn (type *"google.golang.org/grpc".ClientConn) as type *"github.com/coreos/clair/vendor/google.golang.org/grpc".ClientConn in argument to clairpb.NewAncestryServiceClient
which was like 😕
anyway, using relative imports I was able to clone my branch, skip the go get
, move straight to go build -o klar .
, and got it all working!
Thanks for the development here! Even with me blindly hacking at it, klar
saved a ton of time & effort vs trying to learn protobuf, figuring out Clair's API, and writing my own adapter.
Cheers,
Oh, whoops, didn't mean to PR to the main repo. I don't know go, have no clue what I'm doing, but I keep getting timeout errors when trying to push a layer to Clair. A timeout of one minute seems a little low, and there appears to be no way to configure it.
I'm experimenting on my branch to see if increasing the timeout (or setting to
0
for "no timeouts plz") actually fixes my issue, or if it's a red herring. If this fixes my issue I'll figure out how to make the timeout configurable, update the PR and ping for a code review.