Skip to content

Commit

Permalink
Upgrade to pgx and pgxpool v5
Browse files Browse the repository at this point in the history
  • Loading branch information
Connor Gorman committed Feb 2, 2023
1 parent 7e0f686 commit 141cda2
Show file tree
Hide file tree
Showing 405 changed files with 595 additions and 599 deletions.
2 changes: 1 addition & 1 deletion central/activecomponent/datastore/datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

"github.com/jackc/pgx/v4/pgxpool"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/stackrox/rox/central/activecomponent/datastore/index"
"github.com/stackrox/rox/central/activecomponent/datastore/internal/store"
"github.com/stackrox/rox/central/activecomponent/datastore/internal/store/postgres"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions central/alert/datastore/bench_postgres_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"

"github.com/jackc/pgx/v4/pgxpool"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/stackrox/rox/central/alert/datastore/internal/search"
postgresStore "github.com/stackrox/rox/central/alert/datastore/internal/store/postgres"
"github.com/stackrox/rox/pkg/env"
Expand All @@ -29,7 +29,7 @@ func BenchmarkDBsWithPostgres(b *testing.B) {
source := pgtest.GetConnectionString(b)
config, err := pgxpool.ParseConfig(source)
require.NoError(b, err)
db, err := pgxpool.ConnectConfig(ctx, config)
db, err := pgxpool.NewWithConfig(ctx, config)
require.NoError(b, err)
gormDB := pgtest.OpenGormDB(b, source)
defer pgtest.CloseGormDB(b, gormDB)
Expand Down
2 changes: 1 addition & 1 deletion central/alert/datastore/datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"

"github.com/blevesearch/bleve"
"github.com/jackc/pgx/v4/pgxpool"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/stackrox/rox/central/alert/datastore/internal/index"
"github.com/stackrox/rox/central/alert/datastore/internal/search"
"github.com/stackrox/rox/central/alert/datastore/internal/store"
Expand Down
2 changes: 1 addition & 1 deletion central/alert/datastore/datastore_sac_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"

"github.com/blevesearch/bleve"
"github.com/jackc/pgx/v4/pgxpool"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/stackrox/rox/central/alert/mappings"
"github.com/stackrox/rox/central/globalindex"
"github.com/stackrox/rox/central/role/resources"
Expand Down
2 changes: 1 addition & 1 deletion central/alert/datastore/internal/store/postgres/index.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions central/alert/datastore/internal/store/postgres/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"context"
"testing"

"github.com/jackc/pgx/v4/pgxpool"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/stackrox/rox/generated/storage"
"github.com/stackrox/rox/pkg/env"
"github.com/stackrox/rox/pkg/fixtures"
Expand Down Expand Up @@ -44,7 +44,7 @@ func (s *AlertsIndexSuite) SetupTest() {
source := pgtest.GetConnectionString(s.T())
config, err := pgxpool.ParseConfig(source)
s.Require().NoError(err)
s.pool, err = pgxpool.ConnectConfig(context.Background(), config)
s.pool, err = pgxpool.NewWithConfig(context.Background(), config)
s.Require().NoError(err)

Destroy(ctx, s.pool)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package postgres
import (
"context"

"github.com/jackc/pgx/v4/pgxpool"
"github.com/jackc/pgx/v5/pgxpool"
v1 "github.com/stackrox/rox/generated/api/v1"
"github.com/stackrox/rox/generated/storage"
"github.com/stackrox/rox/pkg/search"
Expand Down
4 changes: 2 additions & 2 deletions central/alert/datastore/internal/store/postgres/store.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions central/apitoken/datastore/internal/store/postgres/store.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion central/cluster/datastore/datastore_test_constructors.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

"github.com/blevesearch/bleve"
"github.com/jackc/pgx/v4/pgxpool"
"github.com/jackc/pgx/v5/pgxpool"
alertDataStore "github.com/stackrox/rox/central/alert/datastore"
"github.com/stackrox/rox/central/cluster/index"
clusterPostgresStore "github.com/stackrox/rox/central/cluster/store/cluster/postgres"
Expand Down
2 changes: 1 addition & 1 deletion central/cluster/store/cluster/postgres/index.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions central/cluster/store/cluster/postgres/store.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion central/cluster/store/clusterhealth/postgres/index.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions central/cluster/store/clusterhealth/postgres/store.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

"github.com/blevesearch/bleve"
"github.com/jackc/pgx/v4/pgxpool"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/stackrox/rox/central/clustercveedge/datastore/store/postgres"
"github.com/stackrox/rox/central/clustercveedge/index"
"github.com/stackrox/rox/central/clustercveedge/search"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

"github.com/jackc/pgx/v4/pgxpool"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/pkg/errors"
"github.com/stackrox/rox/central/clustercveedge/store"
"github.com/stackrox/rox/central/cve/converter"
Expand Down
2 changes: 1 addition & 1 deletion central/clustercveedge/datastore/store/postgres/index.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions central/clustercveedge/datastore/store/postgres/store.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions central/clusterinit/store/postgres/store.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"time"

"github.com/jackc/pgx/v4/pgxpool"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/pkg/errors"
"github.com/stackrox/rox/central/compliance"
"github.com/stackrox/rox/central/compliance/datastore/internal/store"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions central/complianceoperator/profiles/store/postgres/store.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions central/complianceoperator/rules/store/postgres/store.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions central/complianceoperator/scans/store/postgres/store.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion central/componentcveedge/datastore/datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"

"github.com/blevesearch/bleve"
"github.com/jackc/pgx/v4/pgxpool"
"github.com/jackc/pgx/v5/pgxpool"
clusterIndex "github.com/stackrox/rox/central/cluster/index"
"github.com/stackrox/rox/central/componentcveedge/datastore/store/postgres"
"github.com/stackrox/rox/central/componentcveedge/index"
Expand Down
2 changes: 1 addition & 1 deletion central/componentcveedge/datastore/store/postgres/index.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions central/componentcveedge/datastore/store/postgres/store.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 141cda2

Please sign in to comment.