Skip to content

Commit 42b34dc

Browse files
authored
Merge branch 'main' into cupofcat-fractional-non-string-adr
2 parents e224a84 + 44edcc9 commit 42b34dc

Some content is hidden

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

60 files changed

+2642
-7618
lines changed

.devcontainer/devcontainer.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "flagd dev container",
3+
// Image details: https://github.com/devcontainers/images/tree/main/src/go
4+
"image": "mcr.microsoft.com/devcontainers/go:1.24",
5+
// Features to add to the dev container. More info: https://containers.dev/features.
6+
"features": {
7+
"ghcr.io/devcontainers/features/github-cli:1": {},
8+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
9+
// The 'moby' option is not supported on Debian 'trixie' because 'moby-cli' and related system packages have been removed from that distribution.
10+
"moby": false
11+
}
12+
},
13+
// Configure tool-specific properties.
14+
"customizations": {
15+
"vscode": {
16+
"extensions": [
17+
"EditorConfig.EditorConfig",
18+
"GitHub.copilot",
19+
"GitHub.copilot-chat",
20+
"GitHub.vscode-github-actions",
21+
"GitHub.vscode-pull-request-github",
22+
"golang.go",
23+
"esbenp.prettier-vscode",
24+
"redhat.vscode-yaml",
25+
"cucumberopen.cucumber-official",
26+
"ms-vscode.makefile-tools"
27+
]
28+
}
29+
},
30+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
31+
"remoteUser": "vscode",
32+
"hostRequirements": {
33+
"memory": "8gb"
34+
},
35+
// Use 'postCreateCommand' to run commands after the container is created.
36+
"postCreateCommand": "git submodule update --init --recursive && make workspace-init"
37+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
38+
// "forwardPorts": [],
39+
}

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,4 @@ jobs:
152152
envoy -c ./test/integration/config/envoy.yaml &
153153
154154
- name: Run evaluation test suite
155-
run: go clean -testcache && go test -cover ./test/integration
155+
run: make workspace-clean && cd test/integration && go clean -testcache && go test -cover

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ __debug_bin
33
.vscode
44
dist/
55
.idea
6+
.cursor
67
*.pem
78
# ignore generated code
89
pkg/eval/flagd-definitions.json

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
same "printed page" as the copyright notice for easier
188188
identification within third-party archives.
189189

190-
Copyright [yyyy] [name of copyright owner]
190+
Copyright OpenFeature Maintainers
191191

192192
Licensed under the Apache License, Version 2.0 (the "License");
193193
you may not use this file except in compliance with the License.

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PHONY: .docker-build .build .run .mockgen
22
PREFIX=/usr/local
33
PUBLIC_JSON_SCHEMA_DIR=docs/schema/v0/
4-
ALL_GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort)
4+
ALL_GO_MOD_DIRS := $(shell find . -path ./test/integration -prune -o -type f -name 'go.mod' -exec dirname {} \; | sort)
55

66
FLAGD_DEV_NAMESPACE ?= flagd-dev
77
ZD_TEST_NAMESPACE_FLAGD_PROXY ?= flagd-proxy-zd-test
@@ -119,10 +119,10 @@ MDL_CMD := docker run -v $(ROOT_DIR):/workdir --rm
119119

120120
.PHONY: markdownlint markdownlint-fix
121121
markdownlint:
122-
$(MDL_CMD) davidanson/markdownlint-cli2-rules:$(MDL_DOCKER_VERSION) "**/*.md"
122+
$(MDL_CMD) davidanson/markdownlint-cli2:$(MDL_DOCKER_VERSION) "**/*.md"
123123

124124
markdownlint-fix:
125-
$(MDL_CMD) --entrypoint="markdownlint-cli2-fix" davidanson/markdownlint-cli2-rules:$(MDL_DOCKER_VERSION) "**/*.md"
125+
$(MDL_CMD) davidanson/markdownlint-cli2:$(MDL_DOCKER_VERSION) --fix "**/*.md"
126126

127127
.PHONY: pull-schemas-submodule
128128
pull-schemas-submodule:

benchmark.txt

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,74 @@
11
PASS
2-
ok github.com/open-feature/flagd/core/pkg/certreloader 15.986s
2+
ok github.com/open-feature/flagd/core/pkg/certreloader 17.905s
33
goos: linux
44
goarch: amd64
55
pkg: github.com/open-feature/flagd/core/pkg/evaluator
66
cpu: 11th Gen Intel(R) Core(TM) i9-11950H @ 2.60GHz
7-
BenchmarkFractionalEvaluation/[email protected] 423930 13316 ns/op 7229 B/op 135 allocs/op
8-
BenchmarkFractionalEvaluation/[email protected] 469594 13677 ns/op 7229 B/op 135 allocs/op
9-
BenchmarkFractionalEvaluation/[email protected] 569103 13286 ns/op 7229 B/op 135 allocs/op
10-
BenchmarkFractionalEvaluation/[email protected] 412386 13023 ns/op 7229 B/op 135 allocs/op
11-
BenchmarkResolveBooleanValue/test_staticBoolFlag-16 3106903 1792 ns/op 1008 B/op 11 allocs/op
12-
BenchmarkResolveBooleanValue/test_targetingBoolFlag-16 448164 11250 ns/op 6065 B/op 87 allocs/op
13-
BenchmarkResolveBooleanValue/test_staticObjectFlag-16 3958750 1476 ns/op 1008 B/op 11 allocs/op
14-
BenchmarkResolveBooleanValue/test_missingFlag-16 5331808 1353 ns/op 784 B/op 12 allocs/op
15-
BenchmarkResolveBooleanValue/test_disabledFlag-16 4530751 1301 ns/op 1072 B/op 13 allocs/op
16-
BenchmarkResolveStringValue/test_staticStringFlag-16 4583056 1525 ns/op 1040 B/op 13 allocs/op
17-
BenchmarkResolveStringValue/test_targetingStringFlag-16 839954 10388 ns/op 6097 B/op 89 allocs/op
18-
BenchmarkResolveStringValue/test_staticObjectFlag-16 4252830 1677 ns/op 1008 B/op 11 allocs/op
19-
BenchmarkResolveStringValue/test_missingFlag-16 3743324 1495 ns/op 784 B/op 12 allocs/op
20-
BenchmarkResolveStringValue/test_disabledFlag-16 3495699 1709 ns/op 1072 B/op 13 allocs/op
21-
BenchmarkResolveFloatValue/test:_staticFloatFlag-16 4382868 1511 ns/op 1024 B/op 13 allocs/op
22-
BenchmarkResolveFloatValue/test:_targetingFloatFlag-16 867987 10344 ns/op 6081 B/op 89 allocs/op
23-
BenchmarkResolveFloatValue/test:_staticObjectFlag-16 3913120 1695 ns/op 1008 B/op 11 allocs/op
24-
BenchmarkResolveFloatValue/test:_missingFlag-16 3910468 1349 ns/op 784 B/op 12 allocs/op
25-
BenchmarkResolveFloatValue/test:_disabledFlag-16 3642919 1666 ns/op 1072 B/op 13 allocs/op
26-
BenchmarkResolveIntValue/test_staticIntFlag-16 4077288 1349 ns/op 1008 B/op 11 allocs/op
27-
BenchmarkResolveIntValue/test_targetingNumberFlag-16 922383 7601 ns/op 6065 B/op 87 allocs/op
28-
BenchmarkResolveIntValue/test_staticObjectFlag-16 4995128 1229 ns/op 1008 B/op 11 allocs/op
29-
BenchmarkResolveIntValue/test_missingFlag-16 5574153 1274 ns/op 768 B/op 12 allocs/op
30-
BenchmarkResolveIntValue/test_disabledFlag-16 3633708 1734 ns/op 1072 B/op 13 allocs/op
31-
BenchmarkResolveObjectValue/test_staticObjectFlag-16 1624102 4559 ns/op 2243 B/op 37 allocs/op
32-
BenchmarkResolveObjectValue/test_targetingObjectFlag-16 443880 11995 ns/op 7283 B/op 109 allocs/op
33-
BenchmarkResolveObjectValue/test_staticBoolFlag-16 3462445 1665 ns/op 1008 B/op 11 allocs/op
34-
BenchmarkResolveObjectValue/test_missingFlag-16 4207567 1458 ns/op 784 B/op 12 allocs/op
35-
BenchmarkResolveObjectValue/test_disabledFlag-16 3407262 1848 ns/op 1072 B/op 13 allocs/op
36-
PASS
37-
ok github.com/open-feature/flagd/core/pkg/evaluator 239.506s
7+
BenchmarkFractionalEvaluation/[email protected] 571255 10614 ns/op 7649 B/op 150 allocs/op
8+
BenchmarkFractionalEvaluation/[email protected] 520566 10392 ns/op 7649 B/op 150 allocs/op
9+
BenchmarkFractionalEvaluation/[email protected] 528794 11623 ns/op 7650 B/op 150 allocs/op
10+
BenchmarkFractionalEvaluation/[email protected] 539119 10760 ns/op 7649 B/op 150 allocs/op
11+
BenchmarkResolveBooleanValue/test_staticBoolFlag-16 3894157 1455 ns/op 1137 B/op 25 allocs/op
12+
BenchmarkResolveBooleanValue/test_targetingBoolFlag-16 724237 7574 ns/op 6212 B/op 101 allocs/op
13+
BenchmarkResolveBooleanValue/test_staticObjectFlag-16 3989600 1418 ns/op 1153 B/op 25 allocs/op
14+
BenchmarkResolveBooleanValue/test_missingFlag-16 3963528 1391 ns/op 976 B/op 28 allocs/op
15+
BenchmarkResolveBooleanValue/test_disabledFlag-16 3741255 1478 ns/op 1201 B/op 27 allocs/op
16+
BenchmarkResolveStringValue/test_staticStringFlag-16 3797889 1467 ns/op 1185 B/op 27 allocs/op
17+
BenchmarkResolveStringValue/test_targetingStringFlag-16 782289 7975 ns/op 6244 B/op 103 allocs/op
18+
BenchmarkResolveStringValue/test_staticObjectFlag-16 3901261 1442 ns/op 1153 B/op 25 allocs/op
19+
BenchmarkResolveStringValue/test_missingFlag-16 3916784 1527 ns/op 976 B/op 28 allocs/op
20+
BenchmarkResolveStringValue/test_disabledFlag-16 3732986 1459 ns/op 1201 B/op 27 allocs/op
21+
BenchmarkResolveFloatValue/test:_staticFloatFlag-16 3746072 1445 ns/op 1153 B/op 27 allocs/op
22+
BenchmarkResolveFloatValue/test:_targetingFloatFlag-16 732034 7482 ns/op 6229 B/op 103 allocs/op
23+
BenchmarkResolveFloatValue/test:_staticObjectFlag-16 3881371 1403 ns/op 1153 B/op 25 allocs/op
24+
BenchmarkResolveFloatValue/test:_missingFlag-16 3935251 1405 ns/op 976 B/op 28 allocs/op
25+
BenchmarkResolveFloatValue/test:_disabledFlag-16 3789598 1517 ns/op 1201 B/op 27 allocs/op
26+
BenchmarkResolveIntValue/test_staticIntFlag-16 3917680 1401 ns/op 1137 B/op 25 allocs/op
27+
BenchmarkResolveIntValue/test_targetingNumberFlag-16 806212 6961 ns/op 6213 B/op 101 allocs/op
28+
BenchmarkResolveIntValue/test_staticObjectFlag-16 3981283 1382 ns/op 1153 B/op 25 allocs/op
29+
BenchmarkResolveIntValue/test_missingFlag-16 3851598 1459 ns/op 960 B/op 28 allocs/op
30+
BenchmarkResolveIntValue/test_disabledFlag-16 3614704 1490 ns/op 1201 B/op 27 allocs/op
31+
BenchmarkResolveObjectValue/test_staticObjectFlag-16 1590105 3477 ns/op 2388 B/op 51 allocs/op
32+
BenchmarkResolveObjectValue/test_targetingObjectFlag-16 589382 9432 ns/op 7431 B/op 123 allocs/op
33+
BenchmarkResolveObjectValue/test_staticBoolFlag-16 3938911 1432 ns/op 1137 B/op 25 allocs/op
34+
BenchmarkResolveObjectValue/test_missingFlag-16 3868394 1486 ns/op 976 B/op 28 allocs/op
35+
BenchmarkResolveObjectValue/test_disabledFlag-16 3805280 1481 ns/op 1201 B/op 27 allocs/op
36+
PASS
37+
ok github.com/open-feature/flagd/core/pkg/evaluator 198.557s
3838
? github.com/open-feature/flagd/core/pkg/evaluator/mock [no test files]
3939
PASS
4040
ok github.com/open-feature/flagd/core/pkg/logger 0.003s
4141
? github.com/open-feature/flagd/core/pkg/model [no test files]
42+
PASS
43+
ok github.com/open-feature/flagd/core/pkg/notifications 0.002s
4244
? github.com/open-feature/flagd/core/pkg/service [no test files]
4345
PASS
44-
ok github.com/open-feature/flagd/core/pkg/service/ofrep 0.002s
46+
ok github.com/open-feature/flagd/core/pkg/service/ofrep 0.005s
4547
PASS
46-
ok github.com/open-feature/flagd/core/pkg/store 0.003s
48+
ok github.com/open-feature/flagd/core/pkg/store 1.510s
4749
? github.com/open-feature/flagd/core/pkg/sync [no test files]
4850
PASS
49-
ok github.com/open-feature/flagd/core/pkg/sync/blob 0.016s
51+
ok github.com/open-feature/flagd/core/pkg/sync/blob 0.020s
5052
PASS
51-
ok github.com/open-feature/flagd/core/pkg/sync/builder 0.018s
53+
ok github.com/open-feature/flagd/core/pkg/sync/builder 0.023s
5254
? github.com/open-feature/flagd/core/pkg/sync/builder/mock [no test files]
5355
PASS
5456
ok github.com/open-feature/flagd/core/pkg/sync/file 1.007s
5557
PASS
56-
ok github.com/open-feature/flagd/core/pkg/sync/grpc 8.011s
58+
ok github.com/open-feature/flagd/core/pkg/sync/grpc 8.010s
5759
PASS
58-
ok github.com/open-feature/flagd/core/pkg/sync/grpc/credentials 0.008s
60+
ok github.com/open-feature/flagd/core/pkg/sync/grpc/credentials 0.004s
5961
? github.com/open-feature/flagd/core/pkg/sync/grpc/credentials/mock [no test files]
6062
? github.com/open-feature/flagd/core/pkg/sync/grpc/mock [no test files]
6163
PASS
62-
ok github.com/open-feature/flagd/core/pkg/sync/grpc/nameresolvers 0.002s
64+
ok github.com/open-feature/flagd/core/pkg/sync/grpc/nameresolvers 0.003s
6365
PASS
64-
ok github.com/open-feature/flagd/core/pkg/sync/http 4.006s
66+
ok github.com/open-feature/flagd/core/pkg/sync/http 4.005s
6567
? github.com/open-feature/flagd/core/pkg/sync/http/mock [no test files]
6668
PASS
67-
ok github.com/open-feature/flagd/core/pkg/sync/kubernetes 0.016s
69+
ok github.com/open-feature/flagd/core/pkg/sync/kubernetes 0.018s
6870
? github.com/open-feature/flagd/core/pkg/sync/testing [no test files]
6971
PASS
70-
ok github.com/open-feature/flagd/core/pkg/telemetry 0.016s
72+
ok github.com/open-feature/flagd/core/pkg/telemetry 0.018s
7173
PASS
7274
ok github.com/open-feature/flagd/core/pkg/utils 0.002s

core/go.mod

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ require (
1212
github.com/diegoholiveira/jsonlogic/v3 v3.8.4
1313
github.com/fsnotify/fsnotify v1.9.0
1414
github.com/google/go-cmp v0.7.0
15-
github.com/open-feature/flagd-schemas v0.2.9-0.20250707123415-08b4c52d3b86
15+
github.com/google/uuid v1.6.0
16+
github.com/hashicorp/go-memdb v1.3.5
17+
github.com/open-feature/flagd-schemas v0.2.13
1618
github.com/open-feature/open-feature-operator/apis v0.2.45
1719
github.com/prometheus/client_golang v1.22.0
1820
github.com/robfig/cron v1.2.0
21+
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2
1922
github.com/stretchr/testify v1.10.0
2023
github.com/twmb/murmur3 v1.1.8
21-
github.com/xeipuuv/gojsonschema v1.2.0
22-
github.com/zeebo/xxh3 v1.0.2
2324
go.opentelemetry.io/otel v1.37.0
2425
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.37.0
2526
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0
@@ -32,10 +33,11 @@ require (
3233
go.uber.org/mock v0.5.2
3334
go.uber.org/zap v1.27.0
3435
gocloud.dev v0.42.0
35-
golang.org/x/crypto v0.39.0
36+
golang.org/x/crypto v0.45.0
3637
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac
37-
golang.org/x/mod v0.25.0
38-
golang.org/x/sync v0.15.0
38+
golang.org/x/mod v0.29.0
39+
golang.org/x/oauth2 v0.30.0
40+
golang.org/x/sync v0.18.0
3941
google.golang.org/grpc v1.73.0
4042
google.golang.org/protobuf v1.36.6
4143
gopkg.in/yaml.v3 v3.0.1
@@ -105,15 +107,16 @@ require (
105107
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
106108
github.com/google/gnostic-models v0.6.9 // indirect
107109
github.com/google/s2a-go v0.1.9 // indirect
108-
github.com/google/uuid v1.6.0 // indirect
109110
github.com/google/wire v0.6.0 // indirect
110111
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
111112
github.com/googleapis/gax-go/v2 v2.14.2 // indirect
112113
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect
114+
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
115+
github.com/hashicorp/go-uuid v1.0.2 // indirect
116+
github.com/hashicorp/golang-lru v0.5.4 // indirect
113117
github.com/jmespath/go-jmespath v0.4.0 // indirect
114118
github.com/josharian/intern v1.0.0 // indirect
115119
github.com/json-iterator/go v1.1.12 // indirect
116-
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
117120
github.com/kylelemons/godebug v1.1.0 // indirect
118121
github.com/mailru/easyjson v0.7.7 // indirect
119122
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
@@ -126,24 +129,24 @@ require (
126129
github.com/prometheus/client_model v0.6.2 // indirect
127130
github.com/prometheus/common v0.65.0 // indirect
128131
github.com/prometheus/procfs v0.16.1 // indirect
129-
github.com/spf13/pflag v1.0.5 // indirect
132+
github.com/spf13/pflag v1.0.6 // indirect
130133
github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect
131134
github.com/x448/float16 v0.8.4 // indirect
132135
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
133136
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
137+
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
134138
github.com/zeebo/errs v1.4.0 // indirect
135139
go.opencensus.io v0.24.0 // indirect
136140
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
137141
go.opentelemetry.io/contrib/detectors/gcp v1.36.0 // indirect
138142
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect
139-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect
143+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect
140144
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
141145
go.uber.org/multierr v1.11.0 // indirect
142-
golang.org/x/net v0.41.0 // indirect
143-
golang.org/x/oauth2 v0.30.0 // indirect
144-
golang.org/x/sys v0.33.0 // indirect
145-
golang.org/x/term v0.32.0 // indirect
146-
golang.org/x/text v0.26.0 // indirect
146+
golang.org/x/net v0.47.0 // indirect
147+
golang.org/x/sys v0.38.0 // indirect
148+
golang.org/x/term v0.37.0 // indirect
149+
golang.org/x/text v0.31.0 // indirect
147150
golang.org/x/time v0.11.0 // indirect
148151
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
149152
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect

0 commit comments

Comments
 (0)