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

Update dependency #536

Closed
takoji3 opened this issue Mar 30, 2021 · 4 comments
Closed

Update dependency #536

takoji3 opened this issue Mar 30, 2021 · 4 comments

Comments

@takoji3
Copy link

takoji3 commented Mar 30, 2021

Is your feature request related to a problem? Please describe.
I saw install error. I am not sure but it seems like module path problem.
log is here.

go get -tags 'postgres' -u -v github.com/golang-migrate/migrate/v4/cmd/migrate/
  go get -tags 'postgres' -u -v github.com/golang-migrate/migrate/v4/cmd/migrate/
  shell: /usr/bin/bash -e {0}
  env:
    GOROOT: /opt/hostedtoolcache/go/1.16.2/x64
go: downloading github.com/golang-migrate/migrate v1.3.2
go: downloading github.com/golang-migrate/migrate/v4 v4.14.1
go: downloading github.com/golang-migrate/migrate v3.5.4+incompatible
.
.
.
go: downloading golang.org/x/mod v0.4.2
go get: github.com/xdg/scram@v0.0.0-20180814205039-7eeb5667e42c updating to
	github.com/xdg/scram@v1.0.2: parsing go.mod:
	module declares its path as: github.com/xdg-go/scram
	        but was required as: github.com/xdg/scram
Error: Process completed with exit code 1.

Describe the solution you'd like
I saw related PR. mongodb/mongo-go-driver#624
Need update github.com/xdg/scram to github.com/xdg-go/scram and github.com/xdg/stringprep to github.com/xdg-go/stringprep ?

Describe alternatives you've considered
Not sure. If not needed, any workaround?

Additional context
Add any other context or screenshots about the feature request here.

@xdg
Copy link

xdg commented Mar 30, 2021

I've recreated the legacy scram/stringprep repositories from 2018. That should unbreak things.

@dhui
Copy link
Member

dhui commented Apr 5, 2021

Thanks for the notification @takoji3 and thanks @xdg for recreating the legacy repos and writing a post mortem!

I'm unable to install the migrate CLI via the Go toolchain:

$ docker run -it --rm golang:1.16-alpine
Unable to find image 'golang:1.16-alpine' locally
1.16-alpine: Pulling from library/golang
ca3cd42a7c95: Pull complete 
dbcca316e5c3: Pull complete 
b65b403d39c8: Pull complete 
3e4189aff30b: Pull complete 
f24a58abccf6: Pull complete 
Digest: sha256:6c35b28ceee082c621c818c097f418cd55104a16e51003120c1bf37111ed9cfe
Status: Downloaded newer image for golang:1.16-alpine
/go # go get -u -v github.com/golang-migrate/migrate/v4/cmd/migrate
go: downloading github.com/golang-migrate/migrate v1.3.2
go: downloading github.com/golang-migrate/migrate/v4 v4.14.1
go: downloading github.com/golang-migrate/migrate v3.5.4+incompatible
go: downloading github.com/ClickHouse/clickhouse-go v1.3.12
go: downloading github.com/hashicorp/go-multierror v1.1.0
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4
go: downloading github.com/ClickHouse/clickhouse-go v1.4.3
go: downloading github.com/cockroachdb/cockroach-go v0.0.0-20190925194419-606b3d062051
go: downloading github.com/gocql/gocql v0.0.0-20210401103645-80ab1e13e309
go: downloading github.com/cockroachdb/cockroach-go v2.0.1+incompatible
go: downloading github.com/lib/pq v1.8.0
go: downloading github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8
go: downloading github.com/lib/pq v1.10.0
go: downloading github.com/nakagami/firebirdsql v0.9.0
go: downloading github.com/cenkalti/backoff/v4 v4.0.2
go: downloading go.mongodb.org/mongo-driver v1.1.0
go: downloading github.com/cenkalti/backoff v1.1.0
go: downloading github.com/cenkalti/backoff/v4 v4.1.0
go: downloading github.com/cenkalti/backoff v2.2.1+incompatible
go: downloading go.mongodb.org/mongo-driver v1.5.1
go: downloading github.com/go-sql-driver/mysql v1.5.0
go: downloading github.com/neo4j/neo4j-go-driver v1.8.1-0.20200803113522-b626aa943eba
go: downloading github.com/go-sql-driver/mysql v1.6.0
go: downloading github.com/neo4j/neo4j-go-driver v1.8.3
go: downloading modernc.org/ql v1.0.0
go: downloading modernc.org/ql v1.3.1
go: downloading github.com/snowflakedb/gosnowflake v1.3.5
go: downloading github.com/snowflakedb/gosnowflake v1.4.2
go: downloading cloud.google.com/go v0.64.0
go: downloading cloud.google.com/go/spanner v1.9.0
go: downloading cloud.google.com/go/spanner v1.17.0
go: downloading cloud.google.com/go v0.81.0
go: downloading go.uber.org/atomic v1.4.0
go: downloading google.golang.org/api v0.30.0
go: downloading go.uber.org/atomic v1.7.0
go: downloading google.golang.org/genproto v0.0.0-20201030142918-24207fddd1c3
go: downloading google.golang.org/api v0.43.0
go: downloading google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1
go: downloading github.com/mutecomm/go-sqlcipher/v4 v4.4.0
go: downloading github.com/mutecomm/go-sqlcipher/v4 v4.4.2
go: downloading github.com/mattn/go-sqlite3 v1.10.0
go: downloading github.com/mattn/go-sqlite3 v1.14.6
go: downloading github.com/denisenkom/go-mssqldb v0.0.0-20200620013148-b91950f658ec
go: downloading github.com/denisenkom/go-mssqldb v0.9.0
go: downloading github.com/aws/aws-sdk-go v1.17.7
go: downloading github.com/aws/aws-sdk-go v1.38.12
go: downloading github.com/ktrysmt/go-bitbucket v0.6.4
go: downloading github.com/google/go-github v17.0.0+incompatible
go: downloading github.com/ktrysmt/go-bitbucket v0.9.10
go: downloading github.com/xanzy/go-gitlab v0.15.0
go: downloading golang.org/x/tools v0.0.0-20200818005847-188abfa75333
go: downloading github.com/xanzy/go-gitlab v0.48.0
go: downloading golang.org/x/tools v0.1.0
go: downloading cloud.google.com/go/storage v1.10.0
go: downloading github.com/hashicorp/errwrap v1.0.0
go: downloading github.com/hashicorp/errwrap v1.1.0
go: downloading cloud.google.com/go/storage v1.14.0
go: downloading github.com/jackc/pgconn v1.3.2
go: downloading github.com/jackc/pgconn v1.8.1
go: downloading github.com/golang/snappy v0.0.1
go: downloading github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed
go: downloading github.com/golang/snappy v0.0.3
go: downloading gopkg.in/inf.v0 v0.9.1
go: downloading github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369
go: downloading github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
go: downloading github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24
go: downloading github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548
go: downloading gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b
go: downloading github.com/shopspring/decimal v1.2.0
go: downloading github.com/apache/arrow/go/arrow v0.0.0-20200601151325-b2287a20f230
go: downloading github.com/apache/arrow v0.0.0-20210404171306-fb4462213942
go: downloading github.com/apache/arrow/go/arrow v0.0.0-20210404171306-fb4462213942
go: downloading github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: downloading github.com/google/uuid v1.1.2
go: downloading github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4
go: downloading github.com/google/uuid v1.2.0
go: downloading github.com/snowflakedb/glog v0.0.0-20180824191149-f5055e6f21ce
go: downloading github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4
go: downloading golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899
go: downloading github.com/golang/protobuf v1.4.3
go: downloading golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
go: downloading github.com/golang/protobuf v1.5.2
go: downloading github.com/googleapis/gax-go/v2 v2.0.5
go: downloading github.com/googleapis/gax-go v1.0.3
go: downloading go.opencensus.io v0.22.4
go: downloading go.opencensus.io v0.23.0
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go: downloading google.golang.org/grpc v1.33.1
go: downloading google.golang.org/grpc v1.36.1
go: downloading google.golang.org/protobuf v1.25.0
go: downloading google.golang.org/protobuf v1.26.0
go: downloading github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe
go: downloading golang.org/x/net v0.0.0-20201029221708-28c70e62bb1d
go: downloading golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c
go: downloading github.com/k0kubun/pp v2.3.0+incompatible
go: downloading github.com/k0kubun/pp v1.3.0
go: downloading github.com/k0kubun/pp v3.0.1+incompatible
go: downloading github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238
go: downloading github.com/mitchellh/mapstructure v1.4.1
go: downloading golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
go: downloading golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602
go: downloading github.com/google/go-querystring v1.0.0
go: downloading github.com/google/go-querystring v1.1.0
go: downloading github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58
go: downloading github.com/jackc/chunkreader v1.0.0
go: downloading github.com/jackc/chunkreader/v2 v2.0.1
go: downloading github.com/jackc/pgio v1.0.0
go: downloading github.com/jackc/pgpassfile v1.0.0
go: downloading github.com/jackc/pgproto3 v1.1.0
go: downloading github.com/jackc/pgproto3/v2 v2.0.1
go: downloading github.com/jackc/pgproto3/v2 v2.0.7
go: downloading golang.org/x/text v0.3.3
go: downloading golang.org/x/text v0.3.6
go: downloading github.com/go-stack/stack v1.8.0
go: downloading github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c
go: downloading github.com/xdg/scram v1.0.2
go: downloading github.com/xdg/stringprep v1.0.0
go: downloading github.com/xdg/stringprep v1.0.2
go: downloading golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208
go: downloading golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
go: downloading github.com/google/flatbuffers v1.11.0
go: downloading modernc.org/b v1.0.0
go: downloading modernc.org/b v1.0.1
go: downloading modernc.org/db v1.0.0
go: downloading github.com/google/flatbuffers v1.12.0
go: downloading modernc.org/db v1.0.1
go: downloading modernc.org/file v1.0.0
go: downloading modernc.org/file v1.0.2
go: downloading modernc.org/golex v1.0.0
go: downloading modernc.org/golex v1.0.1
go: downloading modernc.org/internal v1.0.0
go: downloading modernc.org/lldb v1.0.0
go: downloading modernc.org/mathutil v1.0.0
go: downloading modernc.org/lldb v1.0.1
go: downloading modernc.org/mathutil v1.2.2
go: downloading modernc.org/strutil v1.1.0
go: downloading github.com/jstemmer/go-junit-report v0.9.1
go: downloading modernc.org/strutil v1.1.1
go: downloading golang.org/x/lint v0.0.0-20200302205851-738671d3881b
go: downloading golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5
go: downloading github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
go: downloading golang.org/x/sys v0.0.0-20201029080932-201ba4db2418
go: downloading golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57
go: downloading google.golang.org/appengine v1.6.6
go: downloading google.golang.org/appengine v1.6.7
go: downloading github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af
go: downloading github.com/jmespath/go-jmespath v0.4.0
go: downloading github.com/mattn/go-colorable v0.1.1
go: downloading github.com/mattn/go-colorable v0.1.8
go: downloading modernc.org/fileutil v1.0.0
go: downloading modernc.org/sortutil v1.1.0
go: downloading modernc.org/zappy v1.0.0
go: downloading modernc.org/zappy v1.0.3
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0
go: downloading github.com/google/go-cmp v0.5.1
go: downloading github.com/google/go-cmp v0.5.5
go: downloading github.com/mattn/go-isatty v0.0.7
go: downloading github.com/mattn/go-isatty v0.0.12
go: downloading github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712
go: downloading github.com/edsrzf/mmap-go v1.0.0
go: downloading golang.org/x/mod v0.3.0
go: downloading golang.org/x/mod v0.4.2
go get: github.com/xdg/scram@v0.0.0-20180814205039-7eeb5667e42c updating to
	github.com/xdg/scram@v1.0.2: parsing go.mod:
	module declares its path as: github.com/xdg-go/scram
	        but was required as: github.com/xdg/scram
/go # 

Using go get -u -v github.com/golang-migrate/migrate/v4/cmd/migrate@master failed similarly, but running go get (without the -u) works:

/go # go get -v github.com/golang-migrate/migrate/v4/cmd/migrate
github.com/golang-migrate/migrate/v4/internal/url
github.com/golang-migrate/migrate/v4/source
github.com/golang-migrate/migrate/v4/database
github.com/hashicorp/errwrap
github.com/golang-migrate/migrate/v4/database/stub
github.com/hashicorp/go-multierror
github.com/golang-migrate/migrate/v4
github.com/golang-migrate/migrate/v4/source/httpfs
github.com/golang-migrate/migrate/v4/source/file
github.com/golang-migrate/migrate/v4/internal/cli
github.com/golang-migrate/migrate/v4/cmd/migrate
/go # migrate
Usage: migrate OPTIONS COMMAND [arg...]
       migrate [ -version | -help ]

Options:
  -source          Location of the migrations (driver://url)
  -path            Shorthand for -source=file://path
  -database        Run migrations against this database (driver://url)
  -prefetch N      Number of migrations to load in advance before executing (default 10)
  -lock-timeout N  Allow N seconds to acquire database lock (default 15)
  -verbose         Print verbose logging
  -version         Print version
  -help            Print usage

Commands:
  create [-ext E] [-dir D] [-seq] [-digits N] [-format] NAME
	   Create a set of timestamped up/down migrations titled NAME, in directory D with extension E.
	   Use -seq option to generate sequential up/down migrations with N digits.
	   Use -format option to specify a Go time format string. Note: migrations with the same time cause "duplicate migration version" error. 

  goto V       Migrate to version V
  up [N]       Apply all or N up migrations
  down [N]     Apply all or N down migrations
  drop [-f] [-all]    Drop everything inside database
	Use -f to bypass confirmation
	Use -all to apply all down migrations
  force V      Set version V but don't run migration (ignores dirty state)
  version      Print current migration version

Source drivers: file
Database drivers: stub

@dhui dhui closed this as completed Apr 5, 2021
@xdg
Copy link

xdg commented Apr 5, 2021

The problem is that proxy.golang.org has cached the bad (before recreation) repositories. I can repro the problem and this will fix it:

GOPROXY=direct go get -u -v github.com/golang-migrate/migrate/v4/cmd/migrate

I'll update my retrospective and the various tickets.

Updating the migrate go.mod file to require go.mongodb.org/mongo-driver v1.5.1 might be the best approach for users.

@xdg
Copy link

xdg commented Apr 5, 2021

I've created dummy tags that are higher than the old tags in xdg/{scram,stringprep} and registered them with proxy.golang.org. Now this works:

go get -u -v github.com/golang-migrate/migrate/v4/cmd/migrate

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

3 participants