diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b2048c1984351b48488ecf0ae152a0e9b6558eaa..cb33af9c89b8e50d7b8564dfdfb9036543939cbc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,7 +28,7 @@ lint: - cd /go/src/gitlab.com/${CI_PROJECT_PATH} unit tests: - image: golang:1.19.3 + image: golang:1.19.4 extends: .gotest stage: test tags: @@ -37,7 +37,7 @@ unit tests: coverage: '/total:\s+\(statements\)\s+(\d+.\d+\%)/' govulncheck: - image: golang:1.19.3 + image: golang:1.19.4 stage: test tags: - amd64-docker diff --git a/deployment/ci/Dockerfile b/deployment/ci/Dockerfile index 0a90d092da2c9ed30a876e3a60458d037c0280ad..bbc72a09370de206b7c09b2a1ff5703069a09827 100644 --- a/deployment/ci/Dockerfile +++ b/deployment/ci/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.3-alpine3.15 as builder +FROM golang:1.19.4-alpine3.17 as builder RUN apk add git @@ -8,7 +8,7 @@ ADD . . RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-X main.Version=$(git describe --tags --always)" -mod=vendor -o /tmp/infohub ./cmd/infohub/... -FROM alpine:3.15 as runner +FROM alpine:3.17 as runner COPY --from=builder /tmp/infohub /opt/infohub diff --git a/deployment/compose/Dockerfile b/deployment/compose/Dockerfile index 6e4ef22aac6a1bde7022d47c3fe69c67e96ca345..d033fbdbe212ea07f9ba1ccc38cf6f7bc85e53a5 100644 --- a/deployment/compose/Dockerfile +++ b/deployment/compose/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.3 +FROM golang:1.19.4 ENV GO111MODULE=on diff --git a/internal/service/infohub/service.go b/internal/service/infohub/service.go index 56149b5457fe02a7d951250819694e80461aa90f..8e661a3e56e337b545eae6ad67c6b349bfbd6379 100644 --- a/internal/service/infohub/service.go +++ b/internal/service/infohub/service.go @@ -135,7 +135,7 @@ func (s *Service) Export(ctx context.Context, req *infohub.ExportRequest) (inter } // get the results of all policies configured in the export - policyResults, err := s.getExportData(ctx, req.ExportName, policyNames) + policyResults, err := s.getExportData(ctx, exportCfg.ExportName, policyNames) if err != nil { if errors.Is(errors.NotFound, err) { if err := s.triggerExport(ctx, exportCfg); err != nil { diff --git a/internal/storage/storage.go b/internal/storage/storage.go index c85b2af5a5faf87471ca880a7ee7a9d27a384247..0cb1d45dd906558aaf5db9f9c69b11f6546eacb7 100644 --- a/internal/storage/storage.go +++ b/internal/storage/storage.go @@ -6,6 +6,7 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" "go.uber.org/zap" "gitlab.com/gaia-x/data-infrastructure-federation-services/tsa/golib/errors" @@ -39,7 +40,10 @@ func New(db *mongo.Client, dbname, collection string, logger *zap.Logger) (*Stor func (s *Storage) ExportConfiguration(ctx context.Context, exportName string) (*ExportConfiguration, error) { result := s.exportConfig.FindOne(ctx, bson.M{ "exportName": exportName, - }) + }, options.FindOne().SetCollation(&options.Collation{ + Locale: "en", + Strength: 2, + })) if result.Err() != nil { if strings.Contains(result.Err().Error(), "no documents in result") {