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

Error when installing package #77

Closed
Cosaquee opened this issue Jan 7, 2019 · 3 comments
Closed

Error when installing package #77

Cosaquee opened this issue Jan 7, 2019 · 3 comments

Comments

@Cosaquee
Copy link

Cosaquee commented Jan 7, 2019

In our CI we can see this error:

[Container] 2019/01/07 10:50:59 Running command go get github.com/aws/aws-xray-sdk-go/...
# github.com/aws/aws-xray-sdk-go/strategy/exception
/go/src/github.com/aws/aws-xray-sdk-go/strategy/exception/default_exception_formatting_strategy.go:148:25: cannot convert frame (type "github.com/pkg/errors".Frame) to type uintptr

Running the same command inside official Go container for versions

  • 1.11
~/go/src/github.com/cosaquee/xray-demo(master ✗) docker run -it --rm golang:1.11
Unable to find image 'golang:1.11' locally
1.11: Pulling from library/golang
cd8eada9c7bb: Already exists
c2677faec825: Already exists
fcce419a96b1: Already exists
045b51e26e75: Already exists
70a7003e9fe9: Already exists
751b6f060321: Pull complete
462a907acb44: Pull complete
Digest: sha256:4f1cd313c3d59faa0ca93910f9d853bd74be7afbf6f6997aee06924415ec7dc9
Status: Downloaded newer image for golang:1.11
root@c2fdab63256d:/go# go get -u github.com/aws/aws-xray-sdk-go/...
# github.com/aws/aws-xray-sdk-go/strategy/exception
src/github.com/aws/aws-xray-sdk-go/strategy/exception/default_exception_formatting_strategy.go:148:25: cannot convert frame (type "github.com/pkg/errors".Frame) to type uintptr
root@c2fdab63256d:/go#
  • 1.10
/go/src/github.com/cosaquee/xray-demo(master ✗) docker run -it --rm golang:1.10
Unable to find image 'golang:1.10' locally
1.10: Pulling from library/golang
cd8eada9c7bb: Already exists
c2677faec825: Pull complete
fcce419a96b1: Pull complete
045b51e26e75: Pull complete
70a7003e9fe9: Pull complete
057d7cdb2121: Pull complete
a44377be7095: Pull complete
Digest: sha256:6d006a643599f44b08b0d692102bbb35e12dbd968c68cf0d6c10da9afda9d98d
Status: Downloaded newer image for golang:1.10
root@fc8f80227176:/go# go get -u github.com/aws/aws-xray-sdk-go/...
# github.com/aws/aws-xray-sdk-go/strategy/exception
src/github.com/aws/aws-xray-sdk-go/strategy/exception/default_exception_formatting_strategy.go:148:25: cannot convert frame (type "github.com/pkg/errors".Frame) to type uintptr

We are not using Glide for dependencies management so we are running plain go get commands to download all the packages. As we can see there is an error when downloading this package.

	// We also accept github.com/pkg/errors style stack traces for ease of use
	if err, ok := err.(interface {
		StackTrace() errors.StackTrace
	}); ok {
		for _, frame := range err.StackTrace() {
			s = append(s, uintptr(frame))
		}
	}

The current master of https://github.com/pkg/errors is breaking the code above. This commit has changed type of frame from uintptr to runtime.Frame.

The master is currently broken on Travis also, but I'm not sure if it is related to this issue.

I'm not sure how to handle this situation without rebuilding aws-xray-sdk-go with the pkg/errors version https://github.com/pkg/errors/releases/tag/v0.8.1

@dan-lind
Copy link

dan-lind commented Jan 8, 2019

Running into the exact same issue

@yogiraj07
Copy link
Contributor

yogiraj07 commented Jan 8, 2019

Hi @Cosaquee ,
Thanks for reporting the issue. We have an issue #73 reported for moving away from glide. Currently we support 0.8.x of the errors package and this will be solved as a part of migration away from glide dependency management.

For the moment, rebuilding X-Ray Go SDK with pkg/errors version https://github.com/pkg/errors/releases/tag/v0.8.1 is the solution, if you don't use glide.

Travis is broken due to different reason, however, the current X-Ray Go SDK release is stable.

Best,
Yogi

davecheney added a commit to pkg/errors that referenced this issue Jan 9, 2019
Updates aws/aws-xray-sdk-go#77
Updates evalphobia/logrus_sentry#74

Go 1.12 has updated the behaviour of runtime.FuncForPC so that it
behaves as it did in Go 1.11 and earlier.

This allows errors.Frame to return to a uintptr representing the PC +1
of the caller. This will fix the build breakages of projects that were
tracking HEAD of this package.

Signed-off-by: Dave Cheney <dave@cheney.net>
@Cosaquee
Copy link
Author

Cosaquee commented Jan 9, 2019

I can confirm that after pkg/errors#193 our CI is green. I still need to deploy functions that are using this package but it seems to be ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants