Skip to content

Commit fc79fe5

Browse files
Merge branch 'main' into tracking-exporter
2 parents dd732aa + 95bdbe1 commit fc79fe5

File tree

118 files changed

+7673
-63
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+7673
-63
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package middleware
2+
3+
import (
4+
"net/http"
5+
6+
"github.com/labstack/echo/v4"
7+
)
8+
9+
func AuthMiddlewareErrHandler(err error, _ echo.Context) error {
10+
return &echo.HTTPError{
11+
Code: http.StatusUnauthorized,
12+
Message: err.Error(),
13+
}
14+
}

cmd/relayproxy/api/routes_goff.go

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"github.com/labstack/echo/v4/middleware"
66
etag "github.com/pablor21/echo-etag/v4"
77
echoSwagger "github.com/swaggo/echo-swagger"
8+
middleware2 "github.com/thomaspoignant/go-feature-flag/cmd/relayproxy/api/middleware"
89
"github.com/thomaspoignant/go-feature-flag/cmd/relayproxy/controller"
910
)
1011

@@ -21,6 +22,7 @@ func (s *Server) addGOFFRoutes(
2122
Validator: func(key string, _ echo.Context) (bool, error) {
2223
return s.config.APIKeyExists(key), nil
2324
},
25+
ErrorHandler: middleware2.AuthMiddlewareErrHandler,
2426
}))
2527
}
2628
v1.Use(etag.WithConfig(etag.Config{

cmd/relayproxy/api/routes_ofrep.go

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"github.com/labstack/echo/v4"
55
"github.com/labstack/echo/v4/middleware"
66
etag "github.com/pablor21/echo-etag/v4"
7+
middleware2 "github.com/thomaspoignant/go-feature-flag/cmd/relayproxy/api/middleware"
78
"github.com/thomaspoignant/go-feature-flag/cmd/relayproxy/ofrep"
89
)
910

@@ -27,6 +28,7 @@ func (s *Server) addOFREPRoutes(cFlagEvalOFREP ofrep.EvaluateCtrl) {
2728
Validator: func(key string, _ echo.Context) (bool, error) {
2829
return s.config.APIKeyExists(key), nil
2930
},
31+
ErrorHandler: middleware2.AuthMiddlewareErrHandler,
3032
}))
3133
}
3234
ofrepGroup.POST("/evaluate/flags", cFlagEvalOFREP.BulkEvaluate)

cmd/relayproxy/helm-charts/relay-proxy/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ sources:
55
- "https://github.com/thomaspoignant/go-feature-flag"
66
description: A Helm chart to deploy go-feature-flag-relay proxy into Kubernetes
77
type: application
8-
version: 1.42.0
9-
appVersion: "v1.42.0"
8+
version: 1.43.0
9+
appVersion: "v1.43.0"
1010
icon: https://raw.githubusercontent.com/thomaspoignant/go-feature-flag/main/logo.png
1111
maintainers:
1212
- name: thomaspoignant

cmd/relayproxy/helm-charts/relay-proxy/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# relay-proxy
22

3-
![Version: 1.42.0](https://img.shields.io/badge/Version-1.42.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.42.0](https://img.shields.io/badge/AppVersion-v1.42.0-informational?style=flat-square)
3+
![Version: 1.43.0](https://img.shields.io/badge/Version-1.43.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.43.0](https://img.shields.io/badge/AppVersion-v1.43.0-informational?style=flat-square)
44

55
A Helm chart to deploy go-feature-flag-relay proxy into Kubernetes
66

examples/openfeature_react/react-app/package-lock.json

+40-40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/openfeature_react/react-app/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"devDependencies": {
2121
"@types/react": "^19.0.12",
2222
"@types/react-dom": "^19.0.4",
23-
"@typescript-eslint/eslint-plugin": "^8.27.0",
23+
"@typescript-eslint/eslint-plugin": "^8.29.0",
2424
"@typescript-eslint/parser": "^8.28.0",
2525
"@vitejs/plugin-react": "^4.3.4",
2626
"autoprefixer": "^10.4.21",
@@ -30,6 +30,6 @@
3030
"postcss": "^8.5.3",
3131
"tailwindcss": "^4.0.17",
3232
"typescript": "^5.8.2",
33-
"vite": "^6.2.2"
33+
"vite": "^6.2.3"
3434
}
3535
}

examples/openfeature_web/webapp/package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/openfeature_web/webapp/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"author": "Thomas Poignant",
3131
"license": "MIT",
3232
"devDependencies": {
33-
"@babel/eslint-parser": "^7.26.10",
33+
"@babel/eslint-parser": "^7.27.0",
3434
"@babel/preset-env": "^7.26.9",
3535
"autoprefixer": "^10.4.21",
3636
"babel-loader": "^10.0.0",

openfeature/provider_tests/dotnet-integration-tests/ProviderTests/ProviderTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ public async Task Should_resolve_a_default_value_with_an_empty_apiKey()
396396
ErrorType.General,
397397
Reason.Error,
398398
"",
399-
"impossible to contact GO Feature Flag relay proxy instance");
399+
"invalid token used to contact GO Feature Flag relay proxy instance");
400400
var got = await authenticatedClient.GetBooleanDetailsAsync(flagKey, false, defaultEvaluationContext);
401401
got.Should().BeEquivalentTo(want);
402402
}

openfeature/provider_tests/dotnet-integration-tests/ProviderTests/ProviderTests.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
1515
<PackageReference Include="NUnit" Version="4.3.2" />
1616
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0" />
17-
<PackageReference Include="NUnit.Analyzers" Version="4.6.0" />
17+
<PackageReference Include="NUnit.Analyzers" Version="4.7.0" />
1818
<PackageReference Include="coverlet.collector" Version="6.0.4" />
19-
<PackageReference Include="OpenFeature" Version="2.3.1" />
19+
<PackageReference Include="OpenFeature" Version="2.3.2" />
2020
<PackageReference Include="OpenFeature.Contrib.GOFeatureFlag" Version="0.2.0" />
2121
</ItemGroup>
2222

openfeature/provider_tests/go-integration-tests/provider_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ func TestProvider_apikey_relay_proxy(t *testing.T) {
763763
Variant: "",
764764
Reason: of.ErrorReason,
765765
ErrorCode: of.GeneralCode,
766-
ErrorMessage: "",
766+
ErrorMessage: "authentication/authorization error",
767767
FlagMetadata: map[string]interface{}{},
768768
},
769769
},

openfeature/provider_tests/java-integration-tests/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
<dependency>
2525
<groupId>dev.openfeature</groupId>
2626
<artifactId>sdk</artifactId>
27-
<version>1.14.1</version>
27+
<version>1.14.2</version>
2828
</dependency>
2929
<dependency>
3030
<groupId>dev.openfeature.contrib.providers</groupId>
3131
<artifactId>go-feature-flag</artifactId>
32-
<version>0.4.2</version>
32+
<version>0.4.3</version>
3333
</dependency>
3434
</dependencies>
3535

0 commit comments

Comments
 (0)