Skip to content

Commit

Permalink
Support using DIGEST-MD5 as the SASL mechanism for ElasticJob `Coordi…
Browse files Browse the repository at this point in the history
…natorRegistryCenter` under GraalVM Native Image
  • Loading branch information
linghengqian committed Aug 13, 2024
1 parent 756de29 commit c7025ed
Show file tree
Hide file tree
Showing 16 changed files with 1,198 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/graalvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,5 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: 'maven'
native-image-job-reports: 'true'
- name: Run nativeTest with GraalVM CE for ${{ matrix.java-version }}
continue-on-error: true
- name: Run nativeTest with GraalVM CE for ${{ matrix.java }}
run: ./mvnw -PnativeTestInElasticJob -T1C -B -e clean test
22 changes: 18 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<mockito.version>4.11.0</mockito.version>
<awaitility.version>4.2.0</awaitility.version>
<bytebuddy.version>1.14.18</bytebuddy.version>
<testcontainers-bom.version>1.20.1</testcontainers-bom.version>

<h2.version>2.2.224</h2.version>
<hikari-cp.version>4.0.3</hikari-cp.version>
Expand Down Expand Up @@ -350,6 +351,13 @@
<version>${awaitility.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>${testcontainers-bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
Expand Down Expand Up @@ -951,8 +959,8 @@
<defaultMode>Conditional</defaultMode>
<modes>
<conditional>
<userCodeFilterPath>${user.dir}/test/native/native-image-filter/user-code-filter.json</userCodeFilterPath>
<extraFilterPath>${user.dir}/test/native/native-image-filter/extra-filter.json</extraFilterPath>
<userCodeFilterPath>${user.dir}/test/native/native-image-filter/user-code-filter-zookeeper.json</userCodeFilterPath>
<extraFilterPath>${user.dir}/test/native/native-image-filter/extra-filter-zookeeper.json</extraFilterPath>
<parallel>true</parallel>
</conditional>
</modes>
Expand All @@ -961,7 +969,7 @@
<stage>main</stage>
</disabledStages>
<merge>false</merge>
<outputDirectory>${user.dir}/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere.elasticjob/generated-reachability-metadata/</outputDirectory>
<outputDirectory>${user.dir}/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.zookeeper/zookeeper/3.9.2/</outputDirectory>
</metadataCopy>
</agent>
</configuration>
Expand Down Expand Up @@ -995,7 +1003,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>org.apache.shardingsphere.elasticjob.test.natived.**</include>
<include>org.apache.shardingsphere.elasticjob.test.natived.it.staticd.ZookeeperAuthTest</include>
</includes>
</configuration>
</plugin>
Expand All @@ -1006,6 +1014,12 @@
<extensions>true</extensions>
<configuration>
<quickBuild>true</quickBuild>
<buildArgs>
<buildArg>-H:+UnlockExperimentalVMOptions</buildArg>
<buildArg>-g</buildArg>
<buildArg>-O0</buildArg>
<buildArg>-H:-DeleteLocalSymbols</buildArg>
</buildArgs>
</configuration>
<executions>
<execution>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"condition":{"typeReachable":"com.github.dockerjava.api.model.RuntimeInfo"},
"name":"com.github.dockerjava.api.model.RuntimeInfo",
"allPublicConstructors": true
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,165 @@
"name":"org.apache.shardingsphere.elasticjob.kernel.internal.schedule.LiteJob",
"allDeclaredMethods": true,
"allDeclaredConstructors": true
}
},
{
"name":"org.apache.zookeeper.server.ZooKeeperSaslServer",
"allDeclaredClasses": true,
"allDeclaredMethods": true,
"allDeclaredFields": true,
"allDeclaredConstructors": true,
"allPublicClasses": true,
"allPublicMethods": true,
"allPublicFields": true,
"allPublicConstructors": true,
"allRecordComponents": true,
"allNestMembers": true,
"allSigners": true,
"allPermittedSubclasses": true,
"queryAllDeclaredMethods": true,
"queryAllDeclaredConstructors": true,
"queryAllPublicMethods": true,
"queryAllPublicConstructors": true,
"unsafeAllocated": true
},
{
"name":"org.apache.zookeeper.SaslClientCallbackHandler",
"allDeclaredClasses": true,
"allDeclaredMethods": true,
"allDeclaredFields": true,
"allDeclaredConstructors": true,
"allPublicClasses": true,
"allPublicMethods": true,
"allPublicFields": true,
"allPublicConstructors": true,
"allRecordComponents": true,
"allNestMembers": true,
"allSigners": true,
"allPermittedSubclasses": true,
"queryAllDeclaredMethods": true,
"queryAllDeclaredConstructors": true,
"queryAllPublicMethods": true,
"queryAllPublicConstructors": true,
"unsafeAllocated": true
},
{
"name":"org.apache.zookeeper.server.quorum.auth.SaslQuorumServerCallbackHandler",
"allDeclaredClasses": true,
"allDeclaredMethods": true,
"allDeclaredFields": true,
"allDeclaredConstructors": true,
"allPublicClasses": true,
"allPublicMethods": true,
"allPublicFields": true,
"allPublicConstructors": true,
"allRecordComponents": true,
"allNestMembers": true,
"allSigners": true,
"allPermittedSubclasses": true,
"queryAllDeclaredMethods": true,
"queryAllDeclaredConstructors": true,
"queryAllPublicMethods": true,
"queryAllPublicConstructors": true,
"unsafeAllocated": true
},
{
"name":"org.apache.zookeeper.util.SecurityUtils",
"allDeclaredClasses": true,
"allDeclaredMethods": true,
"allDeclaredFields": true,
"allDeclaredConstructors": true,
"allPublicClasses": true,
"allPublicMethods": true,
"allPublicFields": true,
"allPublicConstructors": true,
"allRecordComponents": true,
"allNestMembers": true,
"allSigners": true,
"allPermittedSubclasses": true,
"queryAllDeclaredMethods": true,
"queryAllDeclaredConstructors": true,
"queryAllPublicMethods": true,
"queryAllPublicConstructors": true,
"unsafeAllocated": true
},
{
"name":"org.apache.zookeeper.server.auth.SaslServerCallbackHandler",
"allDeclaredClasses": true,
"allDeclaredMethods": true,
"allDeclaredFields": true,
"allDeclaredConstructors": true,
"allPublicClasses": true,
"allPublicMethods": true,
"allPublicFields": true,
"allPublicConstructors": true,
"allRecordComponents": true,
"allNestMembers": true,
"allSigners": true,
"allPermittedSubclasses": true,
"queryAllDeclaredMethods": true,
"queryAllDeclaredConstructors": true,
"queryAllPublicMethods": true,
"queryAllPublicConstructors": true,
"unsafeAllocated": true
},
{
"name":"org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer",
"allDeclaredClasses": true,
"allDeclaredMethods": true,
"allDeclaredFields": true,
"allDeclaredConstructors": true,
"allPublicClasses": true,
"allPublicMethods": true,
"allPublicFields": true,
"allPublicConstructors": true,
"allRecordComponents": true,
"allNestMembers": true,
"allSigners": true,
"allPermittedSubclasses": true,
"queryAllDeclaredMethods": true,
"queryAllDeclaredConstructors": true,
"queryAllPublicMethods": true,
"queryAllPublicConstructors": true,
"unsafeAllocated": true
},
{
"name":"org.apache.zookeeper.client.ZooKeeperSaslClient",
"allDeclaredClasses": true,
"allDeclaredMethods": true,
"allDeclaredFields": true,
"allDeclaredConstructors": true,
"allPublicClasses": true,
"allPublicMethods": true,
"allPublicFields": true,
"allPublicConstructors": true,
"allRecordComponents": true,
"allNestMembers": true,
"allSigners": true,
"allPermittedSubclasses": true,
"queryAllDeclaredMethods": true,
"queryAllDeclaredConstructors": true,
"queryAllPublicMethods": true,
"queryAllPublicConstructors": true,
"unsafeAllocated": true
},
{
"name":"org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner",
"allDeclaredClasses": true,
"allDeclaredMethods": true,
"allDeclaredFields": true,
"allDeclaredConstructors": true,
"allPublicClasses": true,
"allPublicMethods": true,
"allPublicFields": true,
"allPublicConstructors": true,
"allRecordComponents": true,
"allNestMembers": true,
"allSigners": true,
"allPermittedSubclasses": true,
"queryAllDeclaredMethods": true,
"queryAllDeclaredConstructors": true,
"queryAllPublicMethods": true,
"queryAllPublicConstructors": true,
"unsafeAllocated": true
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[
{
"condition":{"typeReachable":"org.apache.zookeeper.jmx.MBeanRegistry"},
"name":"[Lcom.sun.management.internal.DiagnosticCommandArgumentInfo;"
},
{
"condition":{"typeReachable":"org.apache.zookeeper.jmx.MBeanRegistry"},
"name":"[Lcom.sun.management.internal.DiagnosticCommandInfo;"
},
{
"condition":{"typeReachable":"org.apache.zookeeper.jmx.MBeanRegistry"},
"name":"com.sun.management.internal.DiagnosticCommandArgumentInfo",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String","java.lang.String","java.lang.String","java.lang.String","boolean","boolean","boolean","int"] }]
},
{
"condition":{"typeReachable":"org.apache.zookeeper.jmx.MBeanRegistry"},
"name":"com.sun.management.internal.DiagnosticCommandInfo",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String","java.lang.String","java.lang.String","java.lang.String","java.lang.String","java.lang.String","boolean","java.util.List"] }]
},
{
"condition":{"typeReachable":"org.apache.zookeeper.jmx.MBeanRegistry"},
"name":"java.util.Arrays",
"methods":[{"name":"asList","parameterTypes":["java.lang.Object[]"] }]
}
]
Loading

0 comments on commit c7025ed

Please sign in to comment.