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

Added scenario items ordering for get pending scenarios endpoint. #232

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions auth/email_link/email_modify.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (c *client) handleEmailModification(ctx context.Context, els *emailLinkSign
}
if els.Metadata != nil {
if firebaseID, hasFirebaseID := (*els.Metadata)[auth.FirebaseIDClaim]; hasFirebaseID {
if fErr := server.Auth(ctx).UpdateEmail(ctx, firebaseID.(string), newEmail); fErr != nil { //nolint:forcetypeassert // .
if fErr := server.Auth(ctx).UpdateEmail(ctx, firebaseID.(string), newEmail); fErr != nil { //nolint:forcetypeassert,errcheck // .
oldEmailVal := oldEmail
if els.PhoneNumberToEmailMigrationUserID != nil && *els.PhoneNumberToEmailMigrationUserID != "" {
oldEmailVal = usr.ID
Expand Down Expand Up @@ -95,7 +95,7 @@ func (*client) resetFirebaseEmailModification(ctx context.Context, md *users.JSO
if md != nil {
if firebaseID, hasFirebaseID := (*md)[auth.FirebaseIDClaim]; hasFirebaseID {
return errors.Wrapf(
server.Auth(ctx).UpdateEmail(ctx, firebaseID.(string), oldEmail), //nolint:forcetypeassert // .
server.Auth(ctx).UpdateEmail(ctx, firebaseID.(string), oldEmail), //nolint:forcetypeassert,errcheck // .
"failed to change email in firebase to:%v fbUserID:%v", oldEmail, firebaseID,
)
}
Expand Down
2 changes: 1 addition & 1 deletion auth/email_link/link_verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (c *client) finishAuthProcess(
}
if _, hasRegisteredWith := (*md)[wintrauth.RegisteredWithProviderClaim]; !hasRegisteredWith {
if firebaseID, hasFirebaseID := (*md)[wintrauth.FirebaseIDClaim]; hasFirebaseID {
if !strings.HasPrefix(firebaseID.(string), iceIDPrefix) && !strings.HasPrefix(userID, iceIDPrefix) { //nolint:forcetypeassert // .
if !strings.HasPrefix(firebaseID.(string), iceIDPrefix) && !strings.HasPrefix(userID, iceIDPrefix) { //nolint:forcetypeassert,errcheck // .
mdToUpdate[wintrauth.RegisteredWithProviderClaim] = wintrauth.ProviderFirebase
}
}
Expand Down
8 changes: 4 additions & 4 deletions auth/email_link/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,14 @@ func (c *client) dequeueNextEmails(ctx context.Context) (emailsBatch []string, s
return nil, nil, "", errors.Wrapf(rateErr, "failed to fetch %v email sending rate", pipeRes[1].String())
}
}
batch := pipeRes[0].(*redis.ZSliceCmd).Val() //nolint:forcetypeassert // .
batch := pipeRes[0].(*redis.ZSliceCmd).Val() //nolint:forcetypeassert,errcheck // .
emailsBatch = make([]string, 0, len(batch))
scores = make(map[string]int64, 0)
for _, itemInBatch := range batch {
emailsBatch = append(emailsBatch, itemInBatch.Member.(string)) //nolint:forcetypeassert // .
emailsBatch = append(emailsBatch, itemInBatch.Member.(string)) //nolint:forcetypeassert,errcheck // .
scores[emailsBatch[len(emailsBatch)-1]] = int64(itemInBatch.Score)
}
rate := pipeRes[1].(*redis.StringCmd).Val() //nolint:forcetypeassert // .
rate := pipeRes[1].(*redis.StringCmd).Val() //nolint:forcetypeassert,errcheck // .

return emailsBatch, scores, rate, nil
}
Expand Down Expand Up @@ -290,7 +290,7 @@ func (c *client) filterEmailsWithAliveTTL(ctx context.Context, now *time.Time, e
return nil, errors.Wrapf(remErr, "failed to del ttl %v email ttl", pipeRes[1].String())
}
}
ttlBatch := pipeRes[0].(*redis.FloatSliceCmd).Val() //nolint:forcetypeassert // .
ttlBatch := pipeRes[0].(*redis.FloatSliceCmd).Val() //nolint:forcetypeassert,errcheck // .
if len(ttlBatch) == 0 {
return ttls, nil
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/eskimo-hut/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ func (*service) handleFirebaseEmailMismatch(ctx context.Context, loggedInUser *s

fbClaimInterface, hasFBClaim := loggedInUser.Claims["firebase"]
if hasFBClaim {
signInWithInterface, hasSignInProvider := fbClaimInterface.(map[string]any)["sign_in_provider"]
signInWithInterface, hasSignInProvider := fbClaimInterface.(map[string]any)["sign_in_provider"] //nolint:errcheck // .
if hasSignInProvider {
if signInProvider := signInWithInterface.(string); signInProvider != "password" { //nolint:forcetypeassert,errcheck // .
return nil
Expand Down
2 changes: 1 addition & 1 deletion cmd/fixture/fixture.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,5 +238,5 @@ func (*TestConnectorsBridge) GetAllTestingAuthorizations() (userIDs, tokens []st

func (*TestConnectorsBridge) AssertResponseBody(tb testing.TB, expectedRespBody, actualRespBody string) {
tb.Helper()
assert.Regexp(tb, regexp.MustCompile(strings.ReplaceAll(strings.ReplaceAll(expectedRespBody, "\t", ""), "\n", "")), actualRespBody)
assert.Regexp(tb, regexp.MustCompile(strings.ReplaceAll(strings.ReplaceAll(expectedRespBody, "\t", ""), "\n", "")), actualRespBody) //nolint:testifylint // .
}
62 changes: 31 additions & 31 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@ require (
github.com/google/uuid v1.6.0
github.com/hashicorp/go-multierror v1.1.1
github.com/ice-blockchain/go-tarantool-client v0.0.0-20230327200757-4fc71fa3f7bb
github.com/ice-blockchain/santa v1.162.0
github.com/ice-blockchain/santa v1.168.0
github.com/ice-blockchain/wintr v1.154.0
github.com/imroc/req/v3 v3.48.0
github.com/ip2location/ip2location-go/v9 v9.7.0
github.com/jackc/pgx/v5 v5.7.1
github.com/pkg/errors v0.9.1
github.com/prometheus/common v0.60.1
github.com/prometheus/prometheus v0.55.0
github.com/prometheus/prometheus v0.55.1
github.com/redis/go-redis/v9 v9.7.0
github.com/stretchr/testify v1.9.0
github.com/swaggo/swag v1.16.4
github.com/telegram-mini-apps/init-data-golang v1.1.5
github.com/testcontainers/testcontainers-go v0.34.0
github.com/zeebo/xxh3 v1.0.2
golang.org/x/mod v0.21.0
golang.org/x/net v0.30.0
golang.org/x/mod v0.22.0
golang.org/x/net v0.31.0
)

require (
cel.dev/expr v0.18.0 // indirect
cloud.google.com/go v0.116.0 // indirect
cloud.google.com/go/auth v0.10.0 // indirect
cloud.google.com/go/auth v0.10.1 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.5 // indirect
cloud.google.com/go/compute/metadata v0.5.2 // indirect
cloud.google.com/go/firestore v1.17.0 // indirect
Expand All @@ -51,7 +51,7 @@ require (
github.com/andybalholm/brotli v1.1.1 // indirect
github.com/andybalholm/cascadia v1.3.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bytedance/sonic v1.12.3 // indirect
github.com/bytedance/sonic v1.12.4 // indirect
github.com/bytedance/sonic/loader v0.2.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
Expand All @@ -64,7 +64,7 @@ require (
github.com/containerd/containerd v1.7.23 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/containerd/typeurl/v2 v2.2.1 // indirect
github.com/containerd/typeurl/v2 v2.2.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dennwc/varint v1.0.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
Expand Down Expand Up @@ -96,7 +96,7 @@ require (
github.com/goccy/go-reflect v1.2.0 // indirect
github.com/gofrs/flock v0.12.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang-jwt/jwt/v4 v4.5.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.5-0.20231225225746-43d5d4cd4e0e // indirect
Expand All @@ -114,7 +114,7 @@ require (
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
Expand Down Expand Up @@ -166,32 +166,32 @@ require (
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.31.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.56.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 // indirect
go.opentelemetry.io/otel v1.31.0 // indirect
go.opentelemetry.io/otel/metric v1.31.0 // indirect
go.opentelemetry.io/otel/sdk v1.31.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.31.0 // indirect
go.opentelemetry.io/otel/trace v1.31.0 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.32.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.57.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 // indirect
go.opentelemetry.io/otel v1.32.0 // indirect
go.opentelemetry.io/otel/metric v1.32.0 // indirect
go.opentelemetry.io/otel/sdk v1.32.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.32.0 // indirect
go.opentelemetry.io/otel/trace v1.32.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/mock v0.5.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/arch v0.11.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
golang.org/x/oauth2 v0.23.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/time v0.7.0 // indirect
golang.org/x/tools v0.26.0 // indirect
google.golang.org/api v0.204.0 // indirect
golang.org/x/arch v0.12.0 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect
golang.org/x/oauth2 v0.24.0 // indirect
golang.org/x/sync v0.9.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/text v0.20.0 // indirect
golang.org/x/time v0.8.0 // indirect
golang.org/x/tools v0.27.0 // indirect
google.golang.org/api v0.205.0 // indirect
google.golang.org/appengine/v2 v2.0.6 // indirect
google.golang.org/genproto v0.0.0-20241021214115-324edc3d5d38 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect
google.golang.org/grpc v1.67.1 // indirect
google.golang.org/genproto v0.0.0-20241104194629-dd2ea8efbc28 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect
google.golang.org/grpc v1.68.0 // indirect
google.golang.org/grpc/stats/opentelemetry v0.0.0-20241028142157-ada6787961b3 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
Loading
Loading