Skip to content

Commit

Permalink
fix: gofeatureflag bucketing key
Browse files Browse the repository at this point in the history
  • Loading branch information
tmilos77 committed Dec 23, 2024
1 parent fa9fe72 commit ca8d1ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/feature/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package feature
import (
"context"
"fmt"
"github.com/google/uuid"
cloudcontrolv1beta1 "github.com/kyma-project/cloud-manager/api/cloud-control/v1beta1"
"github.com/kyma-project/cloud-manager/pkg/feature/types"
"github.com/kyma-project/cloud-manager/pkg/util"
Expand Down Expand Up @@ -73,7 +74,7 @@ func ContextFromCtx(ctx context.Context) ffcontext.Context {
func MustContextFromCtx(ctx context.Context) ffcontext.Context {
ffCtx := ContextFromCtx(ctx)
if ffCtx == nil {
ffCtx = ffcontext.NewEvaluationContext("")
ffCtx = ffcontext.NewEvaluationContext(uuid.NewString())
}
return ffCtx
}
Expand All @@ -87,7 +88,7 @@ func ContextBuilderFromCtx(ctx context.Context) ContextBuilder {
b = b.AddCustom(k, v)
}
} else {
b = ffcontext.NewEvaluationContextBuilder("")
b = ffcontext.NewEvaluationContextBuilder(uuid.NewString())
}
return &contextBuilderImpl{builder: b}
}
Expand Down

0 comments on commit ca8d1ea

Please sign in to comment.