i-love-flamingo / flamingo-commerce-adapter-standalone

flamingo-commerce demo (secondary) adapters for the (secondary) ports that work without external services
4 stars 2 forks source link

Update to latest go and flamingo version #17

Closed tessig closed 5 months ago

tessig commented 6 months ago

to fix the issues in https://github.com/i-love-flamingo/flamingo-commerce/issues/556

mishop commented 6 months ago

Any update?

IvanMaidurov commented 6 months ago

Unfortunately due to heavy load I was not able to take care of this issue, I hope I gonna have some time next week.

Sorry for long waiting time

IvanMaidurov commented 6 months ago

dependencies updated, issues should be solved. Please use latest version of flamingo-commerce-adapter-standalone

@mishop please confirm that issue is resolved in your project

mishop commented 6 months ago

Hm, on commerce-demo-carotene, after update (make udpate), i get problem with go.sum. 🤔

DEBUG=1 CONTEXT=dev:testproducts go run main.go serve
../pkg/mod/flamingo.me/flamingo-commerce/v3@v3.9.0/cart/domain/cart/paymentselection.go:10:2: missing go.sum entry for module providing package github.com/google/uuid (imported by flamingo.me/flamingo-commerce/v3/cart/domain/cart); to add:
    go get flamingo.me/flamingo-commerce/v3/cart/domain/cart@v3.9.0
../pkg/mod/flamingo.me/flamingo-commerce/v3@v3.9.0/cart/interfaces/controller/forms/billingform.go:9:2: missing go.sum entry for module providing package flamingo.me/form/application (imported by flamingo.me/flamingo-commerce/v3/cart/interfaces/controller/forms); to add:
    go get flamingo.me/flamingo-commerce/v3/cart/interfaces/controller/forms@v3.9.0
../pkg/mod/flamingo.me/flamingo-commerce/v3@v3.9.0/cart/interfaces/controller/forms/billingform.go:10:2: missing go.sum entry for module providing package flamingo.me/form/domain (imported by flamingo.me/commerce-demo-carotene/graphql); to add:
    go get flamingo.me/commerce-demo-carotene/graphql
../pkg/mod/flamingo.me/flamingo-commerce/v3@v3.9.0/cart/interfaces/controller/forms/personaldataform.go:15:2: missing go.sum entry for module providing package github.com/go-playground/form/v4 (imported by flamingo.me/flamingo-commerce/v3/checkout); to add:
    go get flamingo.me/flamingo-commerce/v3/checkout@v3.9.0
../pkg/mod/flamingo.me/flamingo-commerce/v3@v3.9.0/cart/interfaces/graphql/service.go:9:2: missing go.sum entry for module providing package flamingo.me/graphql; to add:
    go mod download flamingo.me/graphql
graphql/generated.go:36:2: missing go.sum entry for module providing package github.com/99designs/gqlgen/graphql (imported by flamingo.me/commerce-demo-carotene/graphql); to add:
    go get flamingo.me/commerce-demo-carotene/graphql
graphql/generated.go:37:2: missing go.sum entry for module providing package github.com/99designs/gqlgen/graphql/introspection (imported by flamingo.me/commerce-demo-carotene/graphql); to add:
    go get flamingo.me/commerce-demo-carotene/graphql
graphql/generated.go:38:2: missing go.sum entry for module providing package github.com/vektah/gqlparser/v2 (imported by flamingo.me/commerce-demo-carotene/graphql); to add:
    go get flamingo.me/commerce-demo-carotene/graphql
graphql/generated.go:39:2: missing go.sum entry for module providing package github.com/vektah/gqlparser/v2/ast (imported by flamingo.me/commerce-demo-carotene/graphql); to add:
    go get flamingo.me/commerce-demo-carotene/graphql
../pkg/mod/flamingo.me/flamingo-commerce-adapter-standalone@v0.0.3-beta/commercesearch/infrastructure/product/searchServiceAdapter.go:6:2: missing go.sum entry for module providing package github.com/google/go-cmp/cmp (imported by flamingo.me/flamingo-commerce-adapter-standalone/commercesearch/infrastructure/product); to add:
    go get flamingo.me/flamingo-commerce-adapter-standalone/commercesearch/infrastructure/product@v0.0.3-beta
../pkg/mod/github.com/glycerine/go-unsnap-stream@v0.0.0-20181221182339-f9677308dec2/snap.go:7:2: missing go.sum entry for module providing package github.com/golang/snappy (imported by github.com/blevesearch/zap/v11); to add:
    go get github.com/blevesearch/zap/v11@v11.0.12
../pkg/mod/github.com/couchbase/vellum@v1.0.2/fst.go:20:2: missing go.sum entry for module providing package github.com/willf/bitset (imported by github.com/couchbase/vellum); to add:
    go get github.com/couchbase/vellum@v1.0.2
../pkg/mod/github.com/blevesearch/bleve@v1.0.12/index/scorch/builder.go:27:2: missing go.sum entry for module providing package go.etcd.io/bbolt (imported by github.com/blevesearch/bleve/index/scorch); to add:
    go get github.com/blevesearch/bleve/index/scorch@v1.0.12
../pkg/mod/github.com/disintegration/imaging@v1.6.2/io.go:17:2: missing go.sum entry for module providing package golang.org/x/image/bmp (imported by github.com/disintegration/imaging); to add:
    go get github.com/disintegration/imaging@v1.6.2
../pkg/mod/github.com/disintegration/imaging@v1.6.2/io.go:18:2: missing go.sum entry for module providing package golang.org/x/image/tiff (imported by github.com/disintegration/imaging); to add:
    go get github.com/disintegration/imaging@v1.6.2
../pkg/mod/flamingo.me/flamingo-commerce/v3@v3.9.0/cart/infrastructure/placeorder/logger.go:16:2: missing go.sum entry for module providing package golang.org/x/mod/modfile (imported by flamingo.me/flamingo-commerce/v3/cart/infrastructure/placeorder); to add:
    go get flamingo.me/flamingo-commerce/v3/cart/infrastructure/placeorder@v3.9.0
../pkg/mod/flamingo.me/flamingo/v3@v3.8.0/core/locale/application/price_service.go:6:2: missing go.sum entry for module providing package github.com/leekchan/accounting (imported by flamingo.me/flamingo/v3/core/locale/application); to add:
    go get flamingo.me/flamingo/v3/core/locale/application@v3.8.0
../pkg/mod/github.com/nicksnyder/go-i18n@v0.0.0-20180814031359-04f547cc50da/i18n/bundle/bundle.go:16:2: missing go.sum entry for module providing package github.com/pelletier/go-toml (imported by github.com/nicksnyder/go-i18n/i18n/bundle); to add:
    go get github.com/nicksnyder/go-i18n/i18n/bundle@v0.0.0-20180814031359-04f547cc50da
../pkg/mod/flamingo.me/flamingo-commerce/v3@v3.9.0/product/interfaces/templatefunctions/findProducts.go:11:2: missing go.sum entry for module providing package flamingo.me/pugtemplate/pugjs (imported by flamingo.me/flamingo-commerce/v3/product/interfaces/templatefunctions); to add:
    go get flamingo.me/flamingo-commerce/v3/product/interfaces/templatefunctions@v3.9.0
../pkg/mod/flamingo.me/flamingo-commerce/v3@v3.9.0/cart/module.go:7:2: missing go.sum entry for module providing package flamingo.me/form; to add:
    go mod download flamingo.me/form
../pkg/mod/flamingo.me/flamingo-commerce/v3@v3.9.0/checkout/infrastructure/locker/redis.go:10:2: missing go.sum entry for module providing package github.com/go-redsync/redsync/v4 (imported by flamingo.me/flamingo-commerce/v3/checkout/infrastructure/locker); to add:
    go get flamingo.me/flamingo-commerce/v3/checkout/infrastructure/locker@v3.9.0
../pkg/mod/flamingo.me/flamingo-commerce/v3@v3.9.0/checkout/infrastructure/locker/redis.go:11:2: missing go.sum entry for module providing package github.com/go-redsync/redsync/v4/redis/redigo (imported by flamingo.me/flamingo-commerce/v3/checkout/infrastructure/locker); to add:
    go get flamingo.me/flamingo-commerce/v3/checkout/infrastructure/locker@v3.9.0
main.go:25:2: missing go.sum entry for module providing package flamingo.me/pugtemplate; to add:
    go mod download flamingo.me/pugtemplate
make: *** [serve] Error 1
IvanMaidurov commented 6 months ago

updated commerce-demo-carotene as well

mishop commented 6 months ago

Thank you.

DEBUG=1 CONTEXT=dev:testproducts go run main.go serve
../pkg/mod/github.com/go-playground/validator/v10@v10.17.0/baked_in.go:22:2: missing go.sum entry for module providing package golang.org/x/crypto/sha3 (imported by github.com/go-playground/validator/v10); to add:
    go get github.com/go-playground/validator/v10@v10.17.0
../pkg/mod/github.com/99designs/gqlgen@v0.17.43/internal/code/packages.go:14:2: missing go.sum entry for module providing package golang.org/x/tools/go/packages (imported by github.com/99designs/gqlgen/codegen/config); to add:
    go get github.com/99designs/gqlgen/codegen/config@v0.17.43
../pkg/mod/github.com/99designs/gqlgen@v0.17.43/internal/imports/prune.go:13:2: missing go.sum entry for module providing package golang.org/x/tools/go/ast/astutil (imported by github.com/99designs/gqlgen/internal/imports); to add:
    go get github.com/99designs/gqlgen/internal/imports@v0.17.43
../pkg/mod/github.com/99designs/gqlgen@v0.17.43/internal/imports/prune.go:14:2: missing go.sum entry for module providing package golang.org/x/tools/imports (imported by github.com/99designs/gqlgen/internal/imports); to add:
    go get github.com/99designs/gqlgen/internal/imports@v0.17.43
../pkg/mod/flamingo.me/flamingo-commerce/v3@v3.9.0/cart/infrastructure/placeorder/logger.go:16:2: missing go.sum entry for module providing package golang.org/x/mod/modfile (imported by flamingo.me/flamingo-commerce/v3/cart/infrastructure/placeorder); to add:
    go get flamingo.me/flamingo-commerce/v3/cart/infrastructure/placeorder@v3.9.0
make: *** [serve] Error 1
zsh: exit 2     make serve

After update packages:

go get github.com/go-playground/validator/v10@v10.17.0
 go get github.com/99designs/gqlgen/codegen/config@v0.17.43
 go get github.com/99designs/gqlgen/internal/imports@v0.17.43
 go get flamingo.me/flamingo-commerce/v3/cart/infrastructure/placeorder@v3.9.0

Now again same error

DEBUG=1 CONTEXT=dev:testproducts go run main.go serve
# contrib.go.opencensus.io/exporter/jaeger
../pkg/mod/contrib.go.opencensus.io/exporter/jaeger@v0.2.1/agent.go:76:11: a.client.SeqId undefined (type *agent.AgentClient has no field or method SeqId)
../pkg/mod/contrib.go.opencensus.io/exporter/jaeger@v0.2.1/agent.go:77:31: not enough arguments in call to a.client.EmitBatch
    have (*"github.com/uber/jaeger-client-go/thrift-gen/jaeger".Batch)
    want (context.Context, *"github.com/uber/jaeger-client-go/thrift-gen/jaeger".Batch)
../pkg/mod/contrib.go.opencensus.io/exporter/jaeger@v0.2.1/jaeger.go:363:22: not enough arguments in call to obj.Write
    have (*thrift.TBinaryProtocol)
    want (context.Context, thrift.TProtocol)
make: *** [serve] Error 1
zsh: exit 2     make serve
IvanMaidurov commented 6 months ago

I'm not sure if I understand what are you doing. I checked out just now to latest master of commerce-demo-carotene, downloaded data using "download-product-data" in makefile and everything was fine.

mishop commented 6 months ago

Sorry, maybe I wasn't clear. Jaeger bug not fixed. I tried to download a clean one commerce-demo-carotene and run on flamingo v3

git clone commerce-demo-carotene ...
make frontend-build (not working but I fixed it locally)
make update
make serve

Then get this bug: https://github.com/jaegertracing/jaeger-client-go/issues/615

Thank You.

IvanMaidurov commented 6 months ago

oh, thanks, please ignore make update step. So please do:

git clone commerce-demo-carotene ...
make frontend-build
make serve

And it would be great, if you could create an issue and pull request fixing make frontend-build. And I guess we could update guide.

IvanMaidurov commented 5 months ago

Thank you for merge requests, everything updated