Skip to content

Commit 2e8e0f6

Browse files
authored
[DE-456] native image fixes (#483)
* added SPI debug logs * native image fix * fix SPI in native image * fix MP-config in native image * fix SPI in native image * native tests with --link-at-build-time * shaded native tests with --link-at-build-time * plain integration tests * rm java 8 from CI * fix enforcer checks * fix enforcer checks * native tests with single server
1 parent 56bccd6 commit 2e8e0f6

File tree

71 files changed

+2247
-129
lines changed

Some content is hidden

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

71 files changed

+2247
-129
lines changed

.github/workflows/maven-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up JDK
1919
uses: actions/setup-java@v3
2020
with:
21-
java-version: '8'
21+
java-version: '11'
2222
distribution: 'adopt'
2323
cache: 'maven'
2424
server-id: ossrh

.github/workflows/maven-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up JDK
1919
uses: actions/setup-java@v3
2020
with:
21-
java-version: '8'
21+
java-version: '11'
2222
distribution: 'adopt'
2323
cache: 'maven'
2424
server-id: ossrh

.github/workflows/native.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
docker-img:
1717
- docker.io/arangodb/enterprise:3.10.1
1818
topology:
19-
- cluster
19+
- single
2020
java-version:
2121
- 17
2222
module:
2323
- driver
24-
- shaded-integration-tests
24+
- integration-tests
2525

2626
steps:
2727
- uses: actions/checkout@v2
@@ -60,7 +60,7 @@ jobs:
6060
- 17
6161
module:
6262
- driver
63-
- shaded-integration-tests
63+
- integration-tests
6464

6565
steps:
6666
- uses: actions/checkout@v2

.github/workflows/test.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
db-ext-names:
4747
- false
4848
java-version:
49-
- 8
49+
- 11
5050
user-language:
5151
- en
5252
include:
@@ -222,7 +222,7 @@ jobs:
222222
- name: Test
223223
run: mvn --no-transfer-progress -am -pl driver test -Dadb.jackson.version=${{matrix.jackson-version}}
224224

225-
shaded-integration-tests:
225+
integration-tests:
226226
timeout-minutes: 20
227227
runs-on: ubuntu-latest
228228

@@ -255,14 +255,17 @@ jobs:
255255
- name: Install
256256
run: mvn --no-transfer-progress install -DskipTests=true -Dgpg.skip=true -Dmaven.javadoc.skip=true
257257
- name: Test internal-serde
258-
working-directory: shaded-integration-tests
258+
working-directory: integration-tests
259259
run: mvn --no-transfer-progress -Pinternal-serde test
260260
- name: Test jackson-serde
261-
working-directory: shaded-integration-tests
261+
working-directory: integration-tests
262262
run: mvn --no-transfer-progress -Pjackson-serde test
263263
- name: Test jsonb-serde
264-
working-directory: shaded-integration-tests
264+
working-directory: integration-tests
265265
run: mvn --no-transfer-progress -Pjsonb-serde test
266+
- name: Test plain
267+
working-directory: integration-tests
268+
run: mvn --no-transfer-progress -Pplain test
266269

267270
sonar:
268271
timeout-minutes: 10

core/src/main/java/com/arangodb/async/ArangoDBAsync.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ private AsyncProtocolProvider asyncProtocolProvider(Protocol protocol) {
305305
if (p.supportsProtocol(protocol)) {
306306
return p;
307307
}
308+
LOG.debug("Required protocol ({}) not supported by ProtocolProvider: {}", protocol, p.getClass().getName());
308309
}
309310
throw new ArangoDBException("No ProtocolProvider found for protocol: " + protocol);
310311
}

core/src/main/java/com/arangodb/internal/InternalArangoDBBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
* @author Mark Vollmary
4545
*/
4646
public abstract class InternalArangoDBBuilder<T extends InternalArangoDBBuilder<T>> {
47-
private static final Logger LOG = LoggerFactory.getLogger(InternalArangoDBBuilder.class);
47+
protected static final Logger LOG = LoggerFactory.getLogger(InternalArangoDBBuilder.class);
4848
protected final ArangoConfig config = new ArangoConfig();
4949

5050
@SuppressWarnings("unchecked")
@@ -295,6 +295,7 @@ protected ProtocolProvider protocolProvider(Protocol protocol) {
295295
if (p.supportsProtocol(protocol)) {
296296
return p;
297297
}
298+
LOG.debug("Required protocol ({}) not supported by ProtocolProvider: {}", protocol, p.getClass().getName());
298299
}
299300
throw new ArangoDBException("No ProtocolProvider found for protocol: " + protocol);
300301
}

core/src/main/java/com/arangodb/internal/serde/InternalMapperProvider.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
import com.arangodb.ContentType;
55
import com.fasterxml.jackson.core.JsonFactory;
66
import com.fasterxml.jackson.databind.ObjectMapper;
7+
import org.slf4j.Logger;
8+
import org.slf4j.LoggerFactory;
79

810
import java.util.ServiceLoader;
911
import java.util.function.Supplier;
1012

1113
public interface InternalMapperProvider extends Supplier<ObjectMapper> {
14+
Logger LOG = LoggerFactory.getLogger(InternalMapperProvider.class);
15+
1216
static ObjectMapper of(final ContentType contentType) {
1317
String formatName;
1418
if (contentType == ContentType.JSON) {
@@ -24,6 +28,7 @@ static ObjectMapper of(final ContentType contentType) {
2428
if(formatName.equals(jf.getFormatName())){
2529
return new ObjectMapper(jf);
2630
}
31+
LOG.debug("Required format ({}) not supported by JsonFactory: {}", formatName, jf.getClass().getName());
2732
}
2833

2934
throw new ArangoDBException("No JsonFactory found for content type: " + contentType);

driver/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@
138138
<dependency>
139139
<groupId>com.arangodb</groupId>
140140
<artifactId>jackson-serde-vpack</artifactId>
141-
<scope>test</scope>
141+
<optional>true</optional>
142142
</dependency>
143143
<dependency>
144144
<groupId>com.arangodb</groupId>
145145
<artifactId>vst-protocol</artifactId>
146-
<scope>test</scope>
146+
<optional>true</optional>
147147
</dependency>
148148
<dependency>
149149
<groupId>org.reflections</groupId>
@@ -154,7 +154,7 @@
154154
<dependency>
155155
<groupId>org.graalvm.sdk</groupId>
156156
<artifactId>graal-sdk</artifactId>
157-
<version>22.3.0</version>
157+
<version>22.3.1</version>
158158
<scope>test</scope>
159159
</dependency>
160160
<dependency>
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
Args=\
2-
-H:ResourceConfigurationResources=${.}/resource-config.json \
3-
-H:ReflectionConfigurationResources=${.}/reflect-config.json \
2+
-H:ResourceConfigurationResources=${.}/resource-config.json,${.}/resource-config-spi.json \
3+
-H:ReflectionConfigurationResources=${.}/reflect-config.json,${.}/reflect-config-spi.json,${.}/reflect-config-mp-config.json \
44
-H:SerializationConfigurationResources=${.}/serialization-config.json \
5+
--initialize-at-build-time=\
6+
org.slf4j \
57
--initialize-at-run-time=\
6-
io.netty.handler.ssl.BouncyCastleAlpnSslUtils,\
7-
io.netty.handler.codec.compression.ZstdOptions \
8+
io.netty.handler.ssl.BouncyCastleAlpnSslUtils,\
9+
io.netty.handler.codec.compression.ZstdOptions,\
10+
io.netty.handler.codec.compression.BrotliOptions,\
11+
io.netty.handler.codec.compression.Brotli \
812
-Dio.netty.noUnsafe=true \
913
-Dio.netty.leakDetection.level=DISABLED
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[
2+
{
3+
"name": "com.arangodb.config.HostDescription",
4+
"methods": [
5+
{
6+
"name": "parse",
7+
"parameterTypes": [
8+
"java.lang.CharSequence"
9+
]
10+
}
11+
]
12+
}
13+
]

0 commit comments

Comments
 (0)