cli icon indicating copy to clipboard operation
cli copied to clipboard

Cannot run tests locally after fresh clone

Open kevgo opened this issue 3 years ago • 1 comments

Preflight checklist

Describe the bug

The fork github.com/zepatrik/pop does not seem to contain revision ce05da9328cd.

Reproducing the bug

  • empty the Go module cache
  • clone this repo: git clone [email protected]:ory/cli.git
  • run make test

expected behavior: it installs some stuff and then runs the tests

actual behavior: the task aborts with this error message:

go test -p 1 -tags sqlite -count=1 -failfast ./...
go: downloading github.com/zepatrik/pop/v6 v6.0.0-20220519141323-ce05da9328cd
../../go/pkg/mod/github.com/ory/[email protected]/driver/registry_default.go:17:2: github.com/zepatrik/pop/[email protected]: invalid version: unknown revision ce05da9328cd
../../go/pkg/mod/github.com/ory/[email protected]/persistence/sql/persister.go:13:2: github.com/zepatrik/pop/[email protected]: invalid version: unknown revision ce05da9328cd
../../go/pkg/mod/github.com/ory/[email protected]/logrusx/helper.go:12:2: github.com/zepatrik/pop/[email protected]: invalid version: unknown revision ce05da9328cd
make: *** [Makefile:50: test] Error 1

Relevant log output

No response

Relevant configuration

No response

Version

master @ 9e593ae2ff793f38c90ea59ef381982971e6b6d3

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

No response

Additional Context

I verified that the commit is referenced here and doesn't exist in the clone. Strange that CI doesn't catch this.

  • go version go1.18.3 linux/amd64
  • git version 2.36.1

kevgo avatar Jun 28 '22 21:06 kevgo

This works on most machines because the official Go Proxy still caches this revision. It breaks on my Fedora machine because Fedora doesn't use the Google Proxy.

The complete steps to reproduce this (on my Debian machine where this normally works) are therefore:

rm -rf ~/.cache/go-build/
sudo rm -rf ~/go/pkg/
env GOPROXY=direct go test github.com/ory/cli/...

A workaround for those encountering this issue is manually setting the environment variable GOPROXY to "https://proxy.golang.org,direct". I assume the root cause will go away when the override of github.com/gobuffalo/pop/v6 to github.com/zepatrik/pop/[email protected] gets removed after the modifications get merged upstream.

kevgo avatar Jul 01 '22 20:07 kevgo