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

[bug] flagd - parse fractional evaluation data: distribution elements aren't of type []any #1542

Closed
julianocosta89 opened this issue Apr 22, 2024 · 1 comment · Fixed by #1554
Labels
bug Something isn't working

Comments

@julianocosta89
Copy link
Member

Bug Report

Which version of the demo you are using?
77fb27c

Symptom

When running the Demo with docker compose I'm getting the following error:

flagd                    | 2024-04-22T18:45:52.438Z	error	evaluator/fractional.go:30	parse fractional evaluation data: distribution elements aren't of type []any
flagd                    | github.com/open-feature/flagd/core/pkg/evaluator.(*Fractional).Evaluate
flagd                    | 	/src/core/pkg/evaluator/fractional.go:30
flagd                    | github.com/diegoholiveira/jsonlogic/v3.operation
flagd                    | 	/go/pkg/mod/github.com/diegoholiveira/jsonlogic/[email protected]/operation.go:15
flagd                    | github.com/diegoholiveira/jsonlogic/v3.apply
flagd                    | 	/go/pkg/mod/github.com/diegoholiveira/jsonlogic/[email protected]/jsonlogic.go:493
flagd                    | github.com/diegoholiveira/jsonlogic/v3.ApplyInterface
flagd                    | 	/go/pkg/mod/github.com/diegoholiveira/jsonlogic/[email protected]/jsonlogic.go:587
flagd                    | github.com/diegoholiveira/jsonlogic/v3.Apply
flagd                    | 	/go/pkg/mod/github.com/diegoholiveira/jsonlogic/[email protected]/jsonlogic.go:522
flagd                    | github.com/open-feature/flagd/core/pkg/evaluator.(*JSON).evaluateVariant
flagd                    | 	/src/core/pkg/evaluator/json.go:339
flagd                    | github.com/open-feature/flagd/core/pkg/evaluator.resolve[...]
flagd                    | 	/src/core/pkg/evaluator/json.go:276
flagd                    | github.com/open-feature/flagd/core/pkg/evaluator.(*JSON).ResolveBooleanValue
flagd                    | 	/src/core/pkg/evaluator/json.go:207
flagd                    | github.com/open-feature/flagd/core/pkg/service/flag-evaluation.resolve[...]
flagd                    | 	/src/core/pkg/service/flag-evaluation/flag_evaluator.go:291
flagd                    | github.com/open-feature/flagd/core/pkg/service/flag-evaluation.(*FlagEvaluationService).ResolveBoolean
flagd                    | 	/src/core/pkg/service/flag-evaluation/flag_evaluator_v2.go:159
flagd                    | connectrpc.com/connect.NewUnaryHandler[...].func1
flagd                    | 	/go/pkg/mod/connectrpc.com/[email protected]/handler.go:52
flagd                    | connectrpc.com/otelconnect.(*Interceptor).WrapUnary.func1
flagd                    | 	/go/pkg/mod/connectrpc.com/[email protected]/interceptor.go:152
flagd                    | connectrpc.com/connect.NewUnaryHandler[...].func2
flagd                    | 	/go/pkg/mod/connectrpc.com/[email protected]/handler.go:84
flagd                    | connectrpc.com/connect.(*Handler).ServeHTTP
flagd                    | 	/go/pkg/mod/connectrpc.com/[email protected]/handler.go:265
flagd                    | buf.build/gen/go/open-feature/flagd/connectrpc/go/flagd/evaluation/v1/evaluationv1connect.NewServiceHandler.func1
flagd                    | 	/go/pkg/mod/buf.build/gen/go/open-feature/flagd/connectrpc/[email protected]/flagd/evaluation/v1/evaluationv1connect/evaluation.connect.go:247
flagd                    | net/http.HandlerFunc.ServeHTTP
flagd                    | 	/usr/local/go/src/net/http/server.go:2166
flagd                    | github.com/open-feature/flagd/core/pkg/service/flag-evaluation.bufSwitchHandler.ServeHTTP
flagd                    | 	/src/core/pkg/service/flag-evaluation/connect_service.go:51
flagd                    | github.com/open-feature/flagd/core/pkg/service/flag-evaluation.(*ConnectService).setupServer.(*ConnectService).AddMiddleware.Middleware.Handler.func1.1
flagd                    | 	/src/core/pkg/service/middleware/metrics/http_metrics.go:105
flagd                    | github.com/open-feature/flagd/core/pkg/service/middleware/metrics.Middleware.Measure
flagd                    | 	/src/core/pkg/service/middleware/metrics/http_metrics.go:90
flagd                    | github.com/open-feature/flagd/core/pkg/service/flag-evaluation.(*ConnectService).setupServer.(*ConnectService).AddMiddleware.Middleware.Handler.func1
flagd                    | 	/src/core/pkg/service/middleware/metrics/http_metrics.go:104
flagd                    | net/http.HandlerFunc.ServeHTTP
flagd                    | 	/usr/local/go/src/net/http/server.go:2166
flagd                    | github.com/open-feature/flagd/core/pkg/service/flag-evaluation.(*ConnectService).setupServer.(*ConnectService).AddMiddleware.Middleware.Handler.(*Cors).Handler.func2
flagd                    | 	/go/pkg/mod/github.com/rs/[email protected]/cors.go:281
flagd                    | net/http.HandlerFunc.ServeHTTP
flagd                    | 	/usr/local/go/src/net/http/server.go:2166
flagd                    | golang.org/x/net/http2.(*serverConn).runHandler
flagd                    | 	/go/pkg/mod/golang.org/x/[email protected]/http2/server.go:2368
@julianocosta89 julianocosta89 added the bug Something isn't working label Apr 22, 2024
@beeme1mr
Copy link
Contributor

Please update to flagd version v0.10.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants