Skip to content

Commit

Permalink
Host GraalVM Reachability Metadata of `ch.qos.logback:logback-core:1.…
Browse files Browse the repository at this point in the history
…2.12` to fix Error Log in NativeTest (#29635)
  • Loading branch information
linghengqian authored Jan 3, 2024
1 parent 6752fde commit 8c16b8d
Show file tree
Hide file tree
Showing 7 changed files with 174 additions and 52 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
[
{
"condition":{"typeReachable":"ch.qos.logback.core.joran.action.NestedComplexPropertyIA"},
"name":"ch.qos.logback.classic.encoder.PatternLayoutEncoder",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"ch.qos.logback.core.joran.util.beans.BeanDescriptionFactory"},
"name":"ch.qos.logback.classic.encoder.PatternLayoutEncoder",
"queryAllPublicMethods":true
},
{
"condition":{"typeReachable":"ch.qos.logback.core.pattern.parser.Compiler"},
"name":"ch.qos.logback.classic.pattern.DateConverter",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"ch.qos.logback.core.pattern.parser.Compiler"},
"name":"ch.qos.logback.classic.pattern.LevelConverter",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"ch.qos.logback.core.pattern.parser.Compiler"},
"name":"ch.qos.logback.classic.pattern.LineSeparatorConverter",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"ch.qos.logback.core.pattern.parser.Compiler"},
"name":"ch.qos.logback.classic.pattern.LoggerConverter",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"ch.qos.logback.core.pattern.parser.Compiler"},
"name":"ch.qos.logback.classic.pattern.MessageConverter",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"ch.qos.logback.core.pattern.parser.Compiler"},
"name":"ch.qos.logback.classic.pattern.ThreadConverter",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"ch.qos.logback.core.joran.action.AppenderAction"},
"name":"ch.qos.logback.core.ConsoleAppender",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"ch.qos.logback.core.joran.util.beans.BeanDescriptionFactory"},
"name":"ch.qos.logback.core.ConsoleAppender",
"queryAllPublicMethods":true
},
{
"condition":{"typeReachable":"ch.qos.logback.core.joran.util.PropertySetter"},
"name":"ch.qos.logback.core.OutputStreamAppender",
"methods":[{"name":"setEncoder","parameterTypes":["ch.qos.logback.core.encoder.Encoder"] }]
},
{
"condition":{"typeReachable":"ch.qos.logback.core.joran.action.NestedComplexPropertyIA"},
"name":"ch.qos.logback.core.encoder.Encoder",
"methods":[{"name":"valueOf","parameterTypes":["java.lang.String"] }]
},
{
"condition":{"typeReachable":"ch.qos.logback.core.joran.util.PropertySetter"},
"name":"ch.qos.logback.core.encoder.LayoutWrappingEncoder",
"methods":[{"name":"setParent","parameterTypes":["ch.qos.logback.core.spi.ContextAware"] }]
},
{
"condition":{"typeReachable":"ch.qos.logback.core.joran.util.PropertySetter"},
"name":"ch.qos.logback.core.pattern.PatternLayoutEncoderBase",
"methods":[{"name":"setPattern","parameterTypes":["java.lang.String"] }]
},
{
"condition":{"typeReachable":"ch.qos.logback.core.joran.action.NestedComplexPropertyIA"},
"name":"ch.qos.logback.core.spi.ContextAware",
"methods":[{"name":"valueOf","parameterTypes":["java.lang.String"] }]
},
{
"condition":{"typeReachable":"ch.qos.logback.core.joran.action.StatusListenerAction"},
"name":"ch.qos.logback.core.status.NopStatusListener",
"methods":[{"name":"<init>","parameterTypes":[] }]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,5 @@
"condition":{"typeReachable":"com.mysql.cj.NativeSession"},
"name":"com.mysql.cj.util.PerVmServerConfigCacheFactory",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"com.mysql.cj.protocol.StandardSocketFactory"},
"name":"java.lang.Thread",
"fields":[{"name":"threadLocalRandomProbe"}]
}
]
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
[
{
"condition":{"typeReachable":"org.apache.calcite.plan.RelOptCluster"},
"name":"[B"
},
{
"condition":{"typeReachable":"org.apache.calcite.plan.RelOptCluster"},
"name":"[Ljava.lang.String;"
},
{
"condition":{"typeReachable":"org.apache.calcite.plan.RelOptCluster"},
"name":"[Lsun.security.pkcs.SignerInfo;"
},
{
"condition":{"typeReachable":"org.apache.calcite.linq4j.tree.Types"},
"name":"java.lang.Boolean",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,4 @@
[
{
"condition":{"typeReachable":"org.apache.shardingsphere.elasticjob.executor.ElasticJobExecutor"},
"name":"java.util.Properties",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.elasticjob.lite.internal.failover.FailoverListenerManager"},
"name":"java.util.Properties",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.elasticjob.lite.internal.reconcile.ReconcileService"},
"name":"java.util.Properties",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.elasticjob.lite.internal.sharding.ShardingListenerManager$ListenServersChangedJobListener"},
"name":"java.util.Properties",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.elasticjob.lite.internal.sharding.ShardingListenerManager$ShardingTotalCountChangedJobListener"},
"name":"java.util.Properties",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.elasticjob.lite.internal.instance.InstanceNode"},
"name":"org.apache.shardingsphere.elasticjob.infra.handler.sharding.JobInstance",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@
"name":"java.util.Properties",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.authority.rule.AuthorityRule"},
"name":"org.apache.shardingsphere.authority.provider.database.DatabasePermittedAuthorityRegistryProvider",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.authority.rule.AuthorityRule"},
"name":"org.apache.shardingsphere.authority.provider.simple.AllPermittedAuthorityRegistryProvider",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.shortcut.YamlRuleConfigurationShortcuts"},
"name":"org.apache.shardingsphere.authority.yaml.config.YamlAuthorityRuleConfiguration"
Expand Down Expand Up @@ -1064,6 +1054,61 @@
"name":"org.apache.shardingsphere.sqlfederation.optimizer.planner.util.SQLFederationFunctionUtils",
"queryAllPublicMethods":true
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.connection.refresher.type.table.DropTableStatementSchemaRefresher"},
"name":"org.apache.shardingsphere.sqlfederation.optimizer.planner.util.SQLFederationFunctionUtils",
"queryAllPublicMethods":true
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"},
"name":"org.apache.shardingsphere.sqlfederation.optimizer.planner.util.SQLFederationFunctionUtils"
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.cluster.NewClusterContextManagerBuilder"},
"name":"org.apache.shardingsphere.sqlfederation.optimizer.planner.util.SQLFederationFunctionUtils",
"queryAllPublicMethods":true
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.context.ConfigurationContextManager"},
"name":"org.apache.shardingsphere.sqlfederation.optimizer.planner.util.SQLFederationFunctionUtils"
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.context.ResourceMetaDataContextManager"},
"name":"org.apache.shardingsphere.sqlfederation.optimizer.planner.util.SQLFederationFunctionUtils"
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.standalone.NewStandaloneModeContextManager"},
"name":"org.apache.shardingsphere.sqlfederation.optimizer.planner.util.SQLFederationFunctionUtils"
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.mode.metadata.NewMetaDataContextsFactory"},
"name":"org.apache.shardingsphere.sqlfederation.optimizer.planner.util.SQLFederationFunctionUtils",
"queryAllPublicMethods":true
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.context.OptimizerContextFactory"},
"name":"org.apache.shardingsphere.sqlfederation.optimizer.planner.util.SQLFederationFunctionUtils"
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.context.planner.OptimizerPlannerContextFactory"},
"name":"org.apache.shardingsphere.sqlfederation.optimizer.planner.util.SQLFederationFunctionUtils"
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.planner.util.SQLFederationFunctionUtils"},
"name":"org.apache.shardingsphere.sqlfederation.optimizer.planner.util.SQLFederationFunctionUtils"
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.optimizer.planner.util.SQLFederationPlannerUtils"},
"name":"org.apache.shardingsphere.sqlfederation.optimizer.planner.util.SQLFederationFunctionUtils"
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.rule.SQLFederationRule"},
"name":"org.apache.shardingsphere.sqlfederation.optimizer.planner.util.SQLFederationFunctionUtils"
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.rule.builder.SQLFederationRuleBuilder"},
"name":"org.apache.shardingsphere.sqlfederation.optimizer.planner.util.SQLFederationFunctionUtils"
},
{
"condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.shortcut.YamlRuleConfigurationShortcuts"},
"name":"org.apache.shardingsphere.sqlfederation.yaml.config.YamlSQLFederationRuleConfiguration"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"includes":[{
"condition":{"typeReachable":"org.apache.shardingsphere.test.natived.jdbc.databases.MSSQLServerTest"},
"pattern":"\\Qcontainer-license-acceptance.txt\\E"
}, {
"condition":{"typeReachable":"ch.qos.logback.core.util.Loader"},
"pattern":"\\Qlogback-test.xml\\E"
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.test.natived.jdbc.databases.MSSQLServerTest"},
"pattern":"\\Qtest-native/yaml/databases/mssqlserver.yaml\\E"
Expand Down
34 changes: 34 additions & 0 deletions test/native/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<configuration>
<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="org.apache.shardingsphere" level="warn" additivity="false">
<appender-ref ref="console" />
</logger>

<root>
<level value="error" />
<appender-ref ref="console" />
</root>
</configuration>

0 comments on commit 8c16b8d

Please sign in to comment.