Skip to content

Commit fe98d88

Browse files
authored
feat: extract core flagd evaluation and API modules (#1696)
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
1 parent 0856ee9 commit fe98d88

73 files changed

Lines changed: 2203 additions & 549 deletions

File tree

Some content is hidden

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

.github/workflows/release-please.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,12 @@ jobs:
6565
# This means there's no way to skip publishing of a particular module in a multi-module build, so we iterate over each module and publish them individually,
6666
# letting exists-maven-plugin skip the nexus-staging-maven-plugin's entire deploy goal if the artifact exists.
6767
run: |
68+
FLAGD_CORE_VERSION=$(cat tools/flagd-core/version.txt)
6869
mvn --non-recursive --batch-mode --settings release/m2-settings.xml -DskipTests -Dcheckstyle.skip clean deploy
6970
modules=($(cat pom.xml | grep "<module>" | sed 's/\s*<.*>\(.*\)<.*>/\1/'))
7071
for module in "${modules[@]}"
7172
do
72-
mvn --batch-mode --projects $module --settings release/m2-settings.xml -DskipTests -Dcheckstyle.skip clean deploy
73+
mvn --batch-mode --projects $module --settings release/m2-settings.xml -DskipTests -Dcheckstyle.skip -Dflagd-core.version=$FLAGD_CORE_VERSION clean deploy
7374
done
7475
env:
7576
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@
1111
[submodule "providers/go-feature-flag/wasm-releases"]
1212
path = providers/go-feature-flag/wasm-releases
1313
url = https://github.com/go-feature-flag/wasm-releases.git
14+
[submodule "tools/flagd-core/schemas"]
15+
path = tools/flagd-core/schemas
16+
url = https://github.com/open-feature/schemas.git

.release-please-manifest.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@
1313
"providers/ofrep": "0.0.1",
1414
"tools/junit-openfeature": "0.2.1",
1515
"tools/flagd-http-connector": "0.0.4",
16+
"tools/flagd-api": "0.0.1",
17+
"tools/flagd-core": "0.0.1",
1618
".": "1.0.0"
1719
}

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
<modules>
3131
<module>hooks/open-telemetry</module>
3232
<module>tools/junit-openfeature</module>
33+
<module>tools/flagd-api</module>
34+
<module>tools/flagd-core</module>
3335
<module>providers/flagd</module>
3436
<module>providers/flagsmith</module>
3537
<module>providers/go-feature-flag</module>

providers/flagd/pom.xml

Lines changed: 10 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
<!-- caution - updating this will break compatibility with older protobuf-java versions -->
2121
<protobuf-java.min.version>3.25.6</protobuf-java.min.version>
2222
<com.vmlens.version>1.2.24</com.vmlens.version>
23+
<!-- Match any core version locally- at release, CI sets exact version: -Dflagd-core.version=$(cat tools/flagd-core/version.txt) -->
24+
<flagd-core.version>[0.0.1,)</flagd-core.version>
2325
</properties>
2426

2527
<name>flagd</name>
@@ -38,6 +40,13 @@
3840
<dependencies>
3941
<!-- we inherent dev.openfeature.javasdk and the test dependencies from the parent pom -->
4042

43+
<!-- flagd core evaluation logic -->
44+
<dependency>
45+
<groupId>dev.openfeature.contrib.tools</groupId>
46+
<artifactId>flagd-core</artifactId>
47+
<version>${flagd-core.version}</version>
48+
</dependency>
49+
4150
<dependency>
4251
<groupId>com.google.protobuf</groupId>
4352
<artifactId>protobuf-java</artifactId>
@@ -63,37 +72,6 @@
6372

6473
<!-- grpc-netty-shaded bundles netty with epoll support for unix sockets -->
6574

66-
<dependency>
67-
<groupId>com.fasterxml.jackson.core</groupId>
68-
<artifactId>jackson-databind</artifactId>
69-
<version>2.20.1</version>
70-
</dependency>
71-
72-
<dependency>
73-
<groupId>io.github.jamsesso</groupId>
74-
<artifactId>json-logic-java</artifactId>
75-
<version>1.1.0</version>
76-
</dependency>
77-
78-
<!-- Override gson usage of json-logic-java-->
79-
<dependency>
80-
<groupId>com.google.code.gson</groupId>
81-
<artifactId>gson</artifactId>
82-
<version>2.13.1</version>
83-
</dependency>
84-
85-
<dependency>
86-
<groupId>com.networknt</groupId>
87-
<artifactId>json-schema-validator</artifactId>
88-
<version>1.5.9</version>
89-
<exclusions>
90-
<exclusion>
91-
<groupId>org.apache.commons</groupId>
92-
<artifactId>commons-lang3</artifactId>
93-
</exclusion>
94-
</exclusions>
95-
</dependency>
96-
9775
<dependency>
9876
<!-- necessary for Java 9+ -->
9977
<groupId>org.apache.tomcat</groupId>
@@ -108,30 +86,12 @@
10886
<version>4.5.0</version>
10987
</dependency>
11088

111-
<dependency>
112-
<groupId>org.apache.commons</groupId>
113-
<artifactId>commons-lang3</artifactId>
114-
<version>3.20.0</version>
115-
</dependency>
116-
11789
<dependency>
11890
<groupId>io.opentelemetry</groupId>
11991
<artifactId>opentelemetry-api</artifactId>
12092
<version>1.56.0</version>
12193
</dependency>
12294

123-
<dependency>
124-
<groupId>org.semver4j</groupId>
125-
<artifactId>semver4j</artifactId>
126-
<version>5.8.0</version>
127-
</dependency>
128-
129-
<dependency>
130-
<groupId>commons-codec</groupId>
131-
<artifactId>commons-codec</artifactId>
132-
<version>1.20.0</version>
133-
</dependency>
134-
13595
<dependency>
13696
<groupId>org.junit.jupiter</groupId>
13797
<artifactId>junit-jupiter</artifactId>
@@ -213,7 +173,7 @@
213173
<goal>exec</goal>
214174
</goals>
215175
<configuration>
216-
<!-- run: git submodule update \-\-init schemas -->
176+
<!-- run: git submodule update \-\-init schemas for protos -->
217177
<executable>git</executable>
218178
<arguments>
219179
<argument>submodule</argument>
@@ -225,31 +185,6 @@
225185
</execution>
226186
</executions>
227187
</plugin>
228-
<plugin>
229-
<artifactId>maven-resources-plugin</artifactId>
230-
<version>3.3.1</version>
231-
<executions>
232-
<execution>
233-
<id>copy-json-schemas</id>
234-
<phase>generate-resources</phase>
235-
<goals>
236-
<goal>copy-resources</goal>
237-
</goals>
238-
<configuration>
239-
<outputDirectory>${basedir}/src/main/resources/flagd/schemas/</outputDirectory>
240-
<resources>
241-
<resource>
242-
<directory>${basedir}/schemas/json/</directory>
243-
<includes>
244-
<include>flags.json</include>
245-
<include>targeting.json</include>
246-
</includes>
247-
</resource>
248-
</resources>
249-
</configuration>
250-
</execution>
251-
</executions>
252-
</plugin>
253188

254189
<plugin>
255190
<groupId>org.xolstice.maven.plugins</groupId>

0 commit comments

Comments
 (0)