From 6bd81a5687dee69b7df3e3bd4799d15a63c2d735 Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Thu, 28 Dec 2023 14:05:37 +0100 Subject: [PATCH] chore: synchronize workspaces --- driver/config/config.go | 5 +++-- selfservice/strategy/password/validator.go | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/driver/config/config.go b/driver/config/config.go index a5ff6c7fb3b8..f1b839d9093d 100644 --- a/driver/config/config.go +++ b/driver/config/config.go @@ -18,6 +18,8 @@ import ( "testing" "time" + "go.opentelemetry.io/otel/trace/noop" + "github.com/ory/x/crdbx" "github.com/go-webauthn/webauthn/protocol" @@ -27,7 +29,6 @@ import ( "github.com/pkg/errors" "github.com/rs/cors" "github.com/stretchr/testify/require" - "go.opentelemetry.io/otel/trace" "golang.org/x/net/publicsuffix" "github.com/ory/herodot" @@ -426,7 +427,7 @@ func (p *Config) validateIdentitySchemas(ctx context.Context) error { // Tracing still works correctly even though we pass a no-op tracer // here, because the otelhttp package will preferentially use the // tracer from the incoming request context over this one. - httpx.ResilientClientWithTracer(trace.NewNoopTracerProvider().Tracer("github.com/ory/kratos/driver/config")), + httpx.ResilientClientWithTracer(noop.NewTracerProvider().Tracer("github.com/ory/kratos/driver/config")), } if o, ok := ctx.Value(validateIdentitySchemasClientKey).([]httpx.ResilientOptions); ok { diff --git a/selfservice/strategy/password/validator.go b/selfservice/strategy/password/validator.go index 0875dff6a868..be1aac3c3497 100644 --- a/selfservice/strategy/password/validator.go +++ b/selfservice/strategy/password/validator.go @@ -14,13 +14,14 @@ import ( "strings" "time" + "go.opentelemetry.io/otel/trace/noop" + "github.com/ory/kratos/text" "github.com/arbovm/levenshtein" "github.com/dgraph-io/ristretto" "github.com/hashicorp/go-retryablehttp" "github.com/pkg/errors" - "go.opentelemetry.io/otel/trace" "github.com/ory/herodot" "github.com/ory/kratos/driver/config" @@ -88,7 +89,7 @@ func NewDefaultPasswordValidatorStrategy(reg validatorDependencies) (*DefaultPas // Tracing still works correctly even though we pass a no-op tracer // here, because the otelhttp package will preferentially use the // tracer from the incoming request context over this one. - httpx.ResilientClientWithTracer(trace.NewNoopTracerProvider().Tracer("github.com/ory/kratos/selfservice/strategy/password"))), + httpx.ResilientClientWithTracer(noop.NewTracerProvider().Tracer("github.com/ory/kratos/selfservice/strategy/password"))), reg: reg, hashes: cache, minIdentifierPasswordDist: 5, maxIdentifierPasswordSubstrThreshold: 0.5}, nil