Skip to content

Commit f07da4c

Browse files
Prometheus2677FPiety0521
authored andcommitted
Merge branch 'master' into update-pgx-deps
2 parents 6121901 + 7c711c0 commit f07da4c

File tree

9 files changed

+145
-275
lines changed

9 files changed

+145
-275
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
steps:
1212
- uses: actions/setup-go@v3
1313
with:
14-
go-version: 1.19
14+
go-version: "1.20.x"
1515
- uses: actions/checkout@v3
1616
- name: golangci-lint
1717
uses: golangci/golangci-lint-action@v3
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
go: ["1.18.x", "1.19.x"]
25+
go: ["1.19.x", "1.20.x"]
2626
steps:
2727
- uses: actions/checkout@v3
2828

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/golang-migrate/migrate/CI/master)](https://github.com/golang-migrate/migrate/actions/workflows/ci.yaml?query=branch%3Amaster)
1+
[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/golang-migrate/migrate/ci.yaml?branch=master)](https://github.com/golang-migrate/migrate/actions/workflows/ci.yaml?query=branch%3Amaster)
22
[![GoDoc](https://pkg.go.dev/badge/github.com/golang-migrate/migrate)](https://pkg.go.dev/github.com/golang-migrate/migrate/v4)
33
[![Coverage Status](https://img.shields.io/coveralls/github/golang-migrate/migrate/master.svg)](https://coveralls.io/github/golang-migrate/migrate?branch=master)
44
[![packagecloud.io](https://img.shields.io/badge/deb-packagecloud.io-844fec.svg)](https://packagecloud.io/golang-migrate/migrate?filter=debs)
55
[![Docker Pulls](https://img.shields.io/docker/pulls/migrate/migrate.svg)](https://hub.docker.com/r/migrate/migrate/)
6-
![Supported Go Versions](https://img.shields.io/badge/Go-1.18%2C%201.19-lightgrey.svg)
6+
![Supported Go Versions](https://img.shields.io/badge/Go-1.19%2C%201.20-lightgrey.svg)
77
[![GitHub Release](https://img.shields.io/github/release/golang-migrate/migrate.svg)](https://github.com/golang-migrate/migrate/releases)
88
[![Go Report Card](https://goreportcard.com/badge/github.com/golang-migrate/migrate/v4)](https://goreportcard.com/report/github.com/golang-migrate/migrate/v4)
99

SECURITY.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111

1212
## Reporting a Vulnerability
1313

14-
For a [full disclosure](https://en.wikipedia.org/wiki/Full_disclosure_(computer_security)), create a GitHub issue.
15-
16-
For a [coordinated disclosure](https://en.wikipedia.org/wiki/Coordinated_vulnerability_disclosure), email [email protected] and then create a GitHub issue notifying the maintainers that there's a new vulnerability (without the details).
17-
We won't be checking that email address regularly so it's important to also create a GitHub issue to notify us.
14+
We prefer [coordinated disclosures](https://en.wikipedia.org/wiki/Coordinated_vulnerability_disclosure). To start one, create a GitHub security advisory following [these instructions](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)
1815

1916
Please suggest potential impact and urgency in your reports.

cmd/migrate/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[Release Downloads](https://github.com/golang-migrate/migrate/releases)
88

99
```bash
10-
$ curl -L https://github.com/golang-migrate/migrate/releases/download/$version/migrate.$platform-amd64.tar.gz | tar xvz
10+
$ curl -L https://github.com/golang-migrate/migrate/releases/download/$version/migrate.$os-$arch.tar.gz | tar xvz
1111
```
1212

1313
### MacOS

database/spanner/spanner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ import (
1818
"github.com/golang-migrate/migrate/v4"
1919
"github.com/golang-migrate/migrate/v4/database"
2020

21+
adminpb "cloud.google.com/go/spanner/admin/database/apiv1/databasepb"
2122
"github.com/hashicorp/go-multierror"
2223
uatomic "go.uber.org/atomic"
2324
"google.golang.org/api/iterator"
24-
adminpb "google.golang.org/genproto/googleapis/spanner/admin/database/v1"
2525
)
2626

2727
func init() {

database/yugabytedb/yugabytedb.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import (
1414
"github.com/golang-migrate/migrate/v4"
1515
"github.com/golang-migrate/migrate/v4/database"
1616
"github.com/hashicorp/go-multierror"
17+
"github.com/jackc/pgconn"
18+
"github.com/jackc/pgerrcode"
1719
"github.com/lib/pq"
1820
"go.uber.org/atomic"
1921
)
@@ -462,18 +464,16 @@ func (c *YugabyteDB) newBackoff(ctx context.Context) backoff.BackOff {
462464
}
463465

464466
func errIsRetryable(err error) bool {
465-
pqErr := pq.Error{}
466-
if !errors.As(err, &pqErr) {
467+
var pgErr *pgconn.PgError
468+
if !errors.As(err, &pgErr) {
467469
return false
468470
}
469471

470-
code := string(pqErr.Code)
471-
472472
// Assume that it's safe to retry 08006 and XX000 because we check for lock existence
473473
// before creating and lock ID is primary key. Version field in migrations table is primary key too
474-
// and delete all versions is an idempotend operation.
475-
return code == "40001" || // Serialization error (optimistic locking conflict)
476-
code == "40P01" || // Deadlock
477-
code == "08006" || // Connection failure (node down, need to reconnect)
478-
code == "XX000" // Internal error (may happen during HA)
474+
// and delete all versions is an idempotent operation.
475+
return pgErr.Code == pgerrcode.SerializationFailure || // optimistic locking conflict
476+
pgErr.Code == pgerrcode.DeadlockDetected ||
477+
pgErr.Code == pgerrcode.ConnectionFailure || // node down, need to reconnect
478+
pgErr.Code == pgerrcode.InternalError // may happen during HA
479479
}

go.mod

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
module github.com/golang-migrate/migrate/v4
22

33
require (
4-
cloud.google.com/go/spanner v1.34.1
5-
cloud.google.com/go/storage v1.23.0
4+
cloud.google.com/go/spanner v1.44.0
5+
cloud.google.com/go/storage v1.27.0
66
github.com/Azure/go-autorest/autorest/adal v0.9.16
77
github.com/ClickHouse/clickhouse-go v1.4.3
8-
github.com/aws/aws-sdk-go v1.17.7
8+
github.com/aws/aws-sdk-go v1.34.0
99
github.com/cenkalti/backoff/v4 v4.1.2
1010
github.com/cockroachdb/cockroach-go/v2 v2.1.1
11-
github.com/dhui/dktest v0.3.13
11+
github.com/dhui/dktest v0.3.14
1212
github.com/docker/docker v20.10.19+incompatible
1313
github.com/docker/go-connections v0.4.0
1414
github.com/fsouza/fake-gcs-server v1.17.0
@@ -17,9 +17,9 @@ require (
1717
github.com/gocql/gocql v0.0.0-20210515062232-b7ef815b4556
1818
github.com/google/go-github/v39 v39.2.0
1919
github.com/hashicorp/go-multierror v1.1.1
20-
github.com/jackc/pgconn v1.13.0
21-
github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa
22-
github.com/jackc/pgx/v4 v4.17.2
20+
github.com/jackc/pgconn v1.14.0
21+
github.com/jackc/pgerrcode v0.0.0-20201024163028-a0d42d470451
22+
github.com/jackc/pgx/v4 v4.18.1
2323
github.com/ktrysmt/go-bitbucket v0.6.4
2424
github.com/lib/pq v1.10.2
2525
github.com/markbates/pkger v0.15.1
@@ -29,22 +29,23 @@ require (
2929
github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8
3030
github.com/neo4j/neo4j-go-driver v1.8.1-0.20200803113522-b626aa943eba
3131
github.com/snowflakedb/gosnowflake v1.6.3
32-
github.com/stretchr/testify v1.8.0
32+
github.com/stretchr/testify v1.8.1
3333
github.com/xanzy/go-gitlab v0.15.0
3434
go.mongodb.org/mongo-driver v1.7.0
3535
go.uber.org/atomic v1.7.0
36-
golang.org/x/oauth2 v0.0.0-20220630143837-2104d58473e0
36+
golang.org/x/oauth2 v0.1.0
3737
golang.org/x/tools v0.1.12
38-
google.golang.org/api v0.87.0
39-
google.golang.org/genproto v0.0.0-20220714211235-042d03aeabc9
38+
google.golang.org/api v0.106.0
4039
modernc.org/ql v1.0.0
4140
modernc.org/sqlite v1.18.0
4241
)
4342

4443
require (
45-
cloud.google.com/go v0.103.0 // indirect
46-
cloud.google.com/go/compute v1.7.0 // indirect
47-
cloud.google.com/go/iam v0.3.0 // indirect
44+
cloud.google.com/go v0.107.0 // indirect
45+
cloud.google.com/go/compute v1.14.0 // indirect
46+
cloud.google.com/go/compute/metadata v0.2.3 // indirect
47+
cloud.google.com/go/iam v0.8.0 // indirect
48+
cloud.google.com/go/longrunning v0.3.0 // indirect
4849
github.com/Azure/azure-pipeline-go v0.2.3 // indirect
4950
github.com/Azure/azure-storage-blob-go v0.14.0 // indirect
5051
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
@@ -62,7 +63,7 @@ require (
6263
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.7.2 // indirect
6364
github.com/aws/aws-sdk-go-v2/service/s3 v1.16.1 // indirect
6465
github.com/aws/smithy-go v1.8.0 // indirect
65-
github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect
66+
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
6667
github.com/cespare/xxhash/v2 v2.1.2 // indirect
6768
github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58 // indirect
6869
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe // indirect
@@ -73,7 +74,7 @@ require (
7374
github.com/docker/go-units v0.5.0 // indirect
7475
github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712 // indirect
7576
github.com/envoyproxy/go-control-plane v0.10.3 // indirect
76-
github.com/envoyproxy/protoc-gen-validate v0.6.7 // indirect
77+
github.com/envoyproxy/protoc-gen-validate v0.6.13 // indirect
7778
github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect
7879
github.com/gabriel-vasile/mimetype v1.4.0 // indirect
7980
github.com/go-stack/stack v1.8.0 // indirect
@@ -85,22 +86,21 @@ require (
8586
github.com/golang/protobuf v1.5.2 // indirect
8687
github.com/golang/snappy v0.0.4 // indirect
8788
github.com/google/flatbuffers v2.0.0+incompatible // indirect
88-
github.com/google/go-cmp v0.5.8 // indirect
89+
github.com/google/go-cmp v0.5.9 // indirect
8990
github.com/google/go-querystring v1.1.0 // indirect
9091
github.com/google/uuid v1.3.0 // indirect
91-
github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect
92-
github.com/googleapis/gax-go/v2 v2.4.0 // indirect
93-
github.com/googleapis/go-type-adapters v1.0.0 // indirect
92+
github.com/googleapis/enterprise-certificate-proxy v0.2.1 // indirect
93+
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
9494
github.com/gorilla/handlers v1.4.2 // indirect
9595
github.com/gorilla/mux v1.7.4 // indirect
9696
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
9797
github.com/hashicorp/errwrap v1.1.0 // indirect
9898
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
9999
github.com/jackc/pgio v1.0.0 // indirect
100100
github.com/jackc/pgpassfile v1.0.0 // indirect
101-
github.com/jackc/pgproto3/v2 v2.3.1 // indirect
102-
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
103-
github.com/jackc/pgtype v1.12.0 // indirect
101+
github.com/jackc/pgproto3/v2 v2.3.2 // indirect
102+
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
103+
github.com/jackc/pgtype v1.14.0 // indirect
104104
github.com/jmespath/go-jmespath v0.4.0 // indirect
105105
github.com/k0kubun/pp v2.3.0+incompatible // indirect
106106
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect
@@ -128,17 +128,18 @@ require (
128128
github.com/xdg-go/stringprep v1.0.2 // indirect
129129
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
130130
gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b // indirect
131-
go.opencensus.io v0.23.0 // indirect
132-
golang.org/x/crypto v0.1.0 // indirect
131+
go.opencensus.io v0.24.0 // indirect
132+
golang.org/x/crypto v0.6.0 // indirect
133133
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
134-
golang.org/x/net v0.1.0 // indirect
135-
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
136-
golang.org/x/sys v0.1.0 // indirect
137-
golang.org/x/text v0.4.0 // indirect
138-
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
134+
golang.org/x/net v0.7.0 // indirect
135+
golang.org/x/sync v0.1.0 // indirect
136+
golang.org/x/sys v0.5.0 // indirect
137+
golang.org/x/text v0.7.0 // indirect
138+
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
139139
google.golang.org/appengine v1.6.7 // indirect
140-
google.golang.org/grpc v1.48.0 // indirect
141-
google.golang.org/protobuf v1.28.0 // indirect
140+
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
141+
google.golang.org/grpc v1.51.0 // indirect
142+
google.golang.org/protobuf v1.28.1 // indirect
142143
gopkg.in/inf.v0 v0.9.1 // indirect
143144
gopkg.in/yaml.v3 v3.0.1 // indirect
144145
lukechampine.com/uint128 v1.1.1 // indirect

0 commit comments

Comments
 (0)