Skip to content
Snippets Groups Projects
Commit 9fc78424 authored by Valentin Yordanov's avatar Valentin Yordanov
Browse files

Merge branch '5-make-export-http-path-routes-case-insensitive' into 'main'

Draft: make export http path routes case-insensitive

Closes #5

See merge request gaia-x/data-infrastructure-federation-services/tsa/infohub!6
parents c56037bd d6110d02
No related branches found
No related tags found
No related merge requests found
Pipeline #56437 passed with stages
in 3 minutes and 24 seconds
......@@ -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
......
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
......
FROM golang:1.19.3
FROM golang:1.19.4
ENV GO111MODULE=on
......
......@@ -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 {
......
......@@ -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") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment