open-feature / flagd

A feature flag daemon with a Unix philosophy
https://openfeature.dev
Apache License 2.0
453 stars 55 forks source link

[BUG] Errors occured when execute flag install step #1350

Closed warjiang closed 23 hours ago

warjiang commented 1 week ago

Observed behavior

I follow the step in section Go binary , links 👉🏻 https://flagd.dev/installation/#summary image But some errors occured: image Here is the original errors:

go install github.com/open-feature/flagd/flagd@latest

# github.com/open-feature/flagd/flagd/pkg/service/flag-evaluation/ofrep
.gvm/pkgsets/go1.22.5/global/pkg/mod/github.com/open-feature/flagd/flagd@v0.11.0/pkg/service/flag-evaluation/ofrep/handler.go:75:54: undefined: ofrep.BulkEvaluationContextError
.gvm/pkgsets/go1.22.5/global/pkg/mod/github.com/open-feature/flagd/flagd@v0.11.0/pkg/service/flag-evaluation/ofrep/handler.go:80:22: assignment mismatch: 2 variables but h.evaluator.ResolveAllValues returns 1 value
.gvm/pkgsets/go1.22.5/global/pkg/mod/github.com/open-feature/flagd/flagd@v0.11.0/pkg/service/flag-evaluation/ofrep/handler.go:84:47: too many arguments in call to ofrep.BulkEvaluationContextErrorFrom
    have (string, string)
    want ()
# github.com/open-feature/flagd/flagd/pkg/service/flag-sync
.gvm/pkgsets/go1.22.5/global/pkg/mod/github.com/open-feature/flagd/flagd@v0.11.0/pkg/service/flag-sync/sync-multiplexer.go:166:14: assignment mismatch: 2 variables but r.store.GetAll returns 1 value
# github.com/open-feature/flagd/flagd/pkg/service/flag-evaluation
.gvm/pkgsets/go1.22.5/global/pkg/mod/github.com/open-feature/flagd/flagd@v0.11.0/pkg/service/flag-evaluation/flag_evaluator.go:73:17: assignment mismatch: 2 variables but s.eval.ResolveAllValues returns 1 value
.gvm/pkgsets/go1.22.5/global/pkg/mod/github.com/open-feature/flagd/flagd@v0.11.0/pkg/service/flag-evaluation/flag_evaluator.go:336:28: undefined: model.GetErrorMessage
.gvm/pkgsets/go1.22.5/global/pkg/mod/github.com/open-feature/flagd/flagd@v0.11.0/pkg/service/flag-evaluation/flag_evaluator_v2.go:71:17: assignment mismatch: 2 variables but s.eval.ResolveAllValues returns 1 value

Expected Behavior

the flagd binary can be installed in the bin fold for go

Steps to reproduce

execute go install github.com/open-feature/flagd/flagd@latest

BTW, after diving into the code for the latest tag, which is flagd@v0.11.0 image

the flagd use ofrep.BulkEvaluationContextError() in core pkg image

But the core pkg doesn't contains ofrep.BulkEvaluationContextError() for version core/v0.9.3 image

ofrep.BulkEvaluationContextError() doesn't occurs in core pkg until for core/v0.10.0

So the main branch is right, but still now the lastet tag for github.com/open-feature/flagd/flagd is wrong

toddbaert commented 1 week ago

Oh thanks for bringing this to our attention! I think the docker container is the most popular means of using flagd, but we certainly want the bin install to work as well.

So the main branch is right, but still now the lastet tag for github.com/open-feature/flagd/flagd is wrong

Then seems like a new release will fix this: https://github.com/open-feature/flagd/pull/1341

cc @Kavindu-Dodan

Kavindu-Dodan commented 1 week ago

Unfortunately, this is due to the specific go install usage, where flagd module's go.mod file is considered for dependencies. Our image builds use go workspaces, so all submodules of core package (flagd & proxy) use latest core components.

@toddbaert yeah the release will fix this. But we may need to revisit and release core and flagd independently if we wants to promote binary installations 🤔

beeme1mr commented 1 day ago

Hey @warjiang, could you please try again with the latest release?

warjiang commented 1 day ago

go install github.com/open-feature/flagd/flagd@latest

sorry late for the reply, with the latest version ,it works on my desktop:

image

thanks~