Skip to content

Commit

Permalink
chore: synchronize workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Jun 7, 2024
1 parent f6deb47 commit 678a8a7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
steps:
- run: |
docker create --name cockroach -p 26257:26257 \
cockroachdb/cockroach:v22.1.10 start-single-node --insecure
cockroachdb/cockroach:v24.1.0 start-single-node --insecure
docker start cockroach
name: Start CockroachDB
- uses: ory/ci/checkout@master
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
steps:
- run: |
docker create --name cockroach -p 26257:26257 \
cockroachdb/cockroach:v22.1.10 start-single-node --insecure
cockroachdb/cockroach:v24.1.0 start-single-node --insecure
docker start cockroach
name: Start CockroachDB
- uses: ory/ci/checkout@master
Expand Down
13 changes: 5 additions & 8 deletions internal/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,16 @@ import (
"testing"

"github.com/go-jose/go-jose/v3"

"github.com/ory/x/configx"

"github.com/stretchr/testify/require"

"github.com/ory/hydra/v2/x"
"github.com/ory/x/contextx"
"github.com/ory/x/sqlcon/dockertest"

"github.com/ory/hydra/v2/driver"
"github.com/ory/hydra/v2/driver/config"
"github.com/ory/hydra/v2/jwk"
"github.com/ory/hydra/v2/x"
"github.com/ory/x/configx"
"github.com/ory/x/contextx"
"github.com/ory/x/logrusx"
"github.com/ory/x/sqlcon/dockertest"
)

func resetConfig(p *config.DefaultProvider) {
Expand Down Expand Up @@ -87,7 +84,7 @@ func ConnectToPG(t testing.TB) string {
}

func ConnectToCRDB(t testing.TB) string {
return dockertest.RunTestCockroachDBWithVersion(t, "v22.1.2")
return dockertest.RunTestCockroachDBWithVersion(t, "v24.1.0")
}

func ConnectDatabases(t *testing.T, migrate bool, ctxer contextx.Contextualizer) (pg, mysql, crdb driver.Registry, clean func(*testing.T)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ALTER TABLE hydra_client ALTER PRIMARY KEY USING COLUMNS (id, nid) USING HASH;
ALTER TABLE hydra_client ALTER PRIMARY KEY USING COLUMNS (id, nid) USING HASH WITH bucket_count=16;
22 changes: 10 additions & 12 deletions persistence/sql/persister_consent.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,21 @@ import (
"strings"
"time"

"github.com/jmoiron/sqlx"

"github.com/gobuffalo/pop/v6"
"github.com/gofrs/uuid"

"github.com/ory/hydra/v2/oauth2/flowctx"
"github.com/ory/x/otelx"
"github.com/ory/x/sqlxx"

"github.com/ory/x/errorsx"

"github.com/jmoiron/sqlx"
"github.com/pkg/errors"

"github.com/ory/fosite"
"github.com/ory/hydra/v2/client"
"github.com/ory/hydra/v2/consent"
"github.com/ory/hydra/v2/flow"
"github.com/ory/hydra/v2/oauth2/flowctx"
"github.com/ory/hydra/v2/x"
"github.com/ory/x/errorsx"
"github.com/ory/x/otelx"
"github.com/ory/x/sqlcon"
"github.com/ory/x/sqlxx"
)

var _ consent.Manager = &Persister{}
Expand Down Expand Up @@ -87,9 +83,11 @@ func (p *Persister) revokeConsentSession(whereStmt string, whereArgs ...interfac
}

count, err := c.RawQuery(
fmt.Sprintf(
"DELETE FROM hydra_oauth2_flow WHERE nid = ? AND consent_challenge_id IN (%s)",
sqlx.Rebind(sqlx.BindType(c.Dialect.Name()), strings.Join(args, ", ")),
sqlx.Rebind(
sqlx.BindType(c.Dialect.Name()), fmt.Sprintf(
"DELETE FROM hydra_oauth2_flow WHERE nid = ? AND consent_challenge_id IN (%s)",
strings.Join(args, ", "),
),
),
append(
[]interface{}{p.NetworkID(ctx)},
Expand Down

0 comments on commit 678a8a7

Please sign in to comment.