This is an automated email from the ASF dual-hosted git repository.

terrymanu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new dc58103b81f Add JDBC DistSQL bootstrap CI coverage (#40108)
dc58103b81f is described below

commit dc58103b81f50eee99700e7b7f7ae8719c5ced4e
Author: Liang Zhang <[email protected]>
AuthorDate: Fri Oct 9 09:11:01 2026 +0800

    Add JDBC DistSQL bootstrap CI coverage (#40108)
    
    * Fix CI defaults for fork pull requests
    
    * Add JDBC DistSQL bootstrap CI coverage
---
 .../scripts/e2e-sql/generate-e2e-sql-matrix.sh     |   8 +-
 .../e2e-sql/test-generate-e2e-sql-matrix.sh        |  43 +++++++--
 .../reachability-metadata.json                     | 102 +++++++++++++++++++++
 .../reachability-metadata.json                     |  27 ++++++
 4 files changed, 172 insertions(+), 8 deletions(-)

diff --git 
a/.github/workflows/resources/scripts/e2e-sql/generate-e2e-sql-matrix.sh 
b/.github/workflows/resources/scripts/e2e-sql/generate-e2e-sql-matrix.sh
index 312a815b732..9c66c9aa9b6 100755
--- a/.github/workflows/resources/scripts/e2e-sql/generate-e2e-sql-matrix.sh
+++ b/.github/workflows/resources/scripts/e2e-sql/generate-e2e-sql-matrix.sh
@@ -97,7 +97,13 @@ build_matrix() {
      else []
      end) as $extra_job |
 
-    {include: ($base_jobs + $extra_job)}
+    (if $include_extra_job and ($adapters | index("jdbc")) != null and
+       ($modes | index("Standalone")) != null and ($scenarios | 
index("distsql_rdl")) != null
+     then [{adapter:"jdbc", mode:"Standalone", database:"H2", 
scenario:"distsql_rdl_empty", "additional-options":""}]
+     else []
+     end) as $distsql_bootstrap_job |
+
+    {include: ($base_jobs + $extra_job + $distsql_bootstrap_job)}
     '
 }
 
diff --git 
a/.github/workflows/resources/scripts/e2e-sql/test-generate-e2e-sql-matrix.sh 
b/.github/workflows/resources/scripts/e2e-sql/test-generate-e2e-sql-matrix.sh
index 828dd9b8b6f..c2e875d205d 100644
--- 
a/.github/workflows/resources/scripts/e2e-sql/test-generate-e2e-sql-matrix.sh
+++ 
b/.github/workflows/resources/scripts/e2e-sql/test-generate-e2e-sql-matrix.sh
@@ -91,7 +91,7 @@ assert_not_empty() {
 assert_all_scenarios() {
   local desc="$1" matrix_json="$2"
   local expected actual
-  
expected='["db","db_tbl_sql_federation","dbtbl_with_readwrite_splitting","dbtbl_with_readwrite_splitting_and_encrypt","distsql_rdl","empty_rules","encrypt","encrypt_and_readwrite_splitting","encrypt_shadow","mask","mask_encrypt","mask_encrypt_sharding","mask_sharding","passthrough","readwrite_splitting","readwrite_splitting_and_shadow","shadow","sharding_and_encrypt","sharding_and_shadow","sharding_encrypt_shadow","tbl"]'
+  
expected='["db","db_tbl_sql_federation","dbtbl_with_readwrite_splitting","dbtbl_with_readwrite_splitting_and_encrypt","distsql_rdl","distsql_rdl_empty","empty_rules","encrypt","encrypt_and_readwrite_splitting","encrypt_shadow","mask","mask_encrypt","mask_encrypt_sharding","mask_sharding","passthrough","readwrite_splitting","readwrite_splitting_and_shadow","shadow","sharding_and_encrypt","sharding_and_shadow","sharding_encrypt_shadow","tbl"]'
   actual=$(echo "$matrix_json" | jq -c '[.include[].scenario] | unique | sort')
   assert_eq "$desc" "$expected" "$actual"
 }
@@ -126,6 +126,17 @@ assert_extra_passthrough_job() {
   assert_eq "$desc" "1" "$count"
 }
 
+assert_distsql_bootstrap_job() {
+  local desc="$1" matrix_json="$2" expected_count="$3"
+  local count
+  count=$(echo "$matrix_json" | jq '[.include[] | select(
+    .adapter == "jdbc" and .mode == "Standalone" and .database == "H2" and
+    .scenario == "distsql_rdl_empty" and .["additional-options"] == ""
+  )] | length')
+  assert_eq "$desc: bootstrap job count" "$expected_count" "$count"
+  assert_eq "$desc: H2 is limited to bootstrap" "$expected_count" "$(echo 
"$matrix_json" | jq '[.include[] | select(.database == "H2")] | length')"
+}
+
 assert_all_field_eq() {
   local desc="$1" matrix_json="$2" field="$3" expected_val="$4"
   local violations
@@ -134,12 +145,12 @@ assert_all_field_eq() {
   assert_eq "$desc" "0" "$violations"
 }
 
-# Verify all three dimensions cover full range (2 adapters, 2 modes, 2 
databases)
+# Verify all three dimensions cover the expected range
 assert_all_dimensions() {
-  local label="$1" matrix_json="$2"
+  local label="$1" matrix_json="$2" expected_database_count="${3:-2}"
   assert_eq "$label: has both adapters" "2" "$(echo "$matrix_json" | jq 
'[.include[].adapter] | unique | length')"
   assert_eq "$label: has both modes" "2" "$(echo "$matrix_json" | jq 
'[.include[].mode] | unique | length')"
-  assert_eq "$label: has both databases" "2" "$(echo "$matrix_json" | jq 
'[.include[].database] | unique | length')"
+  assert_eq "$label: has expected database count" "$expected_database_count" 
"$(echo "$matrix_json" | jq '[.include[].database] | unique | length')"
 }
 
 assert_less_than() {
@@ -178,7 +189,8 @@ assert_full_trigger() {
   assert_scenarios "$label: smoke-matrix uses default scenarios" 
"$smoke_matrix" '["db","tbl"]'
   local full_matrix
   full_matrix=$(get_output "$outputs" "full-matrix")
-  assert_all_scenarios "$label: full-matrix has all 21 scenarios" 
"$full_matrix"
+  assert_all_scenarios "$label: full-matrix has all 22 scenarios" 
"$full_matrix"
+  assert_distsql_bootstrap_job "$label: full-matrix" "$full_matrix" "1"
   assert_no_excludes "$label: full-matrix has no excluded combinations" 
"$full_matrix"
   assert_extra_passthrough_job "$label: full-matrix has extra passthrough job" 
"$full_matrix"
   assert_not_empty "$label: full-smoke-overlap-count exists" "$(get_output 
"$outputs" "full-smoke-overlap-count")"
@@ -264,6 +276,7 @@ echo "--- #8: adapter_proxy only ---"
 outputs=$(run_script "$(build_filters adapter_proxy=true)")
 smoke=$(get_output "$outputs" "smoke-matrix")
 assert_all_field_eq "#8: smoke all adapter=proxy" "$smoke" "adapter" "proxy"
+assert_distsql_bootstrap_job "#8: proxy-only full-matrix" "$(get_output 
"$outputs" "full-matrix")" "0"
 
 echo ""
 echo "--- #9: adapter_jdbc only ---"
@@ -294,6 +307,7 @@ echo "--- #13: mode_cluster only ---"
 outputs=$(run_script "$(build_filters mode_cluster=true)")
 smoke=$(get_output "$outputs" "smoke-matrix")
 assert_all_field_eq "#13: smoke all mode=Cluster" "$smoke" "mode" "Cluster"
+assert_distsql_bootstrap_job "#13: Cluster-only full-matrix" "$(get_output 
"$outputs" "full-matrix")" "0"
 
 echo ""
 echo "--- #14: mode_core only ---"
@@ -365,8 +379,10 @@ outputs=$(run_script "$(build_filters 
feature_distsql=true)")
 smoke=$(get_output "$outputs" "smoke-matrix")
 assert_scenarios "#20: distsql smoke scenarios" "$smoke" '["distsql_rdl"]'
 full=$(get_output "$outputs" "full-matrix")
-assert_scenarios "#20: distsql scenarios" "$full" '["distsql_rdl"]'
-assert_all_dimensions "#20" "$full"
+assert_scenarios "#20: distsql scenarios" "$full" 
'["distsql_rdl","distsql_rdl_empty"]'
+assert_all_dimensions "#20" "$full" "3"
+assert_distsql_bootstrap_job "#20: DistSQL full-matrix" "$full" "1"
+assert_distsql_bootstrap_job "#20: DistSQL smoke-matrix" "$smoke" "0"
 
 echo ""
 echo "--- #21: feature_sql_federation ---"
@@ -420,6 +436,19 @@ outputs=$(run_script "$(build_filters 
feature_sharding=true feature_encrypt=true
 smoke=$(get_output "$outputs" "smoke-matrix")
 assert_scenarios "#25: smoke scenarios are merged and deduplicated" "$smoke" 
'["db","encrypt","tbl"]'
 
+echo ""
+echo "--- #26: DistSQL bootstrap remains in Stage 2 ---"
+filters=$(build_filters feature_distsql=true)
+outputs=$(run_script "$filters" "pull_request" "cartesian")
+full=$(get_output "$outputs" "full-matrix")
+smoke=$(get_output "$outputs" "smoke-matrix")
+assert_distsql_bootstrap_job "#26: cartesian full-matrix" "$full" "1"
+output_file=$(mktemp)
+GITHUB_OUTPUT="$output_file" bash "$SCRIPT_DIR/generate-remaining-matrix.sh" 
"$filters" "$full" "$smoke"
+remaining=$(get_output "$(cat "$output_file")" "matrix")
+rm -f "$output_file"
+assert_distsql_bootstrap_job "#26: remaining-matrix" "$remaining" "1"
+
 # ============================================================
 # Summary
 # ============================================================
diff --git 
a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/infra-reachability-metadata/reachability-metadata.json
 
b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/infra-reachability-metadata/reachability-metadata.json
index 1c4ccbca1e1..05bd1cd6cad 100644
--- 
a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/infra-reachability-metadata/reachability-metadata.json
+++ 
b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/infra-reachability-metadata/reachability-metadata.json
@@ -2031,6 +2031,108 @@
       },
       "type": 
"org.apache.shardingsphere.sql.parser.engine.postgresql.visitor.statement.type.PostgreSQLDMLStatementVisitor",
       "allPublicConstructors": true
+    },
+    {
+      "condition": {
+        "typeReached": 
"org.apache.shardingsphere.infra.config.rule.validator.RuleConfigurationValidator"
+      },
+      "type": 
"org.apache.shardingsphere.sqlfederation.config.SQLFederationRuleConfiguration",
+      "fields": [
+        {
+          "name": "providerType"
+        }
+      ]
+    },
+    {
+      "condition": {
+        "typeReached": 
"org.apache.shardingsphere.infra.config.rule.validator.RuleConfigurationValidator"
+      },
+      "type": 
"org.apache.shardingsphere.sharding.api.config.rule.ShardingAutoTableRuleConfiguration",
+      "fields": [
+        {
+          "name": "logicTable"
+        },
+        {
+          "name": "shardingStrategy"
+        },
+        {
+          "name": "auditStrategy"
+        }
+      ]
+    },
+    {
+      "condition": {
+        "typeReached": 
"org.apache.shardingsphere.infra.config.rule.validator.RuleConfigurationValidator"
+      },
+      "type": 
"org.apache.shardingsphere.sharding.api.config.validator.ShardingTableRuleConfigurationValidator",
+      "methods": [
+        {
+          "name": "<init>",
+          "parameterTypes": []
+        }
+      ]
+    },
+    {
+      "condition": {
+        "typeReached": "org.apache.shardingsphere.infra.util.yaml.YamlEngine"
+      },
+      "type": 
"org.apache.shardingsphere.sharding.yaml.config.rule.YamlShardingAutoTableRuleConfiguration",
+      "allPublicConstructors": true,
+      "allPublicMethods": true
+    },
+    {
+      "condition": {
+        "typeReached": 
"org.apache.shardingsphere.sharding.yaml.config.rule.YamlShardingAutoTableRuleConfiguration"
+      },
+      "type": 
"org.apache.shardingsphere.sharding.yaml.config.rule.YamlShardingAutoTableRuleConfigurationBeanInfo"
+    },
+    {
+      "condition": {
+        "typeReached": 
"org.apache.shardingsphere.sharding.yaml.config.rule.YamlShardingAutoTableRuleConfiguration"
+      },
+      "type": 
"org.apache.shardingsphere.sharding.yaml.config.rule.YamlShardingAutoTableRuleConfigurationCustomizer"
+    },
+    {
+      "condition": {
+        "typeReached": 
"org.apache.shardingsphere.sql.parser.engine.core.SQLParserFactory"
+      },
+      "type": 
"org.apache.shardingsphere.sql.parser.engine.mysql.parser.MySQLLexer",
+      "methods": [
+        {
+          "name": "<init>",
+          "parameterTypes": [
+            "org.antlr.v4.runtime.CharStream"
+          ]
+        }
+      ]
+    },
+    {
+      "condition": {
+        "typeReached": 
"org.apache.shardingsphere.sql.parser.engine.core.SQLParserFactory"
+      },
+      "type": 
"org.apache.shardingsphere.sql.parser.engine.mysql.parser.MySQLParser",
+      "methods": [
+        {
+          "name": "<init>",
+          "parameterTypes": [
+            "org.antlr.v4.runtime.TokenStream"
+          ]
+        }
+      ]
+    },
+    {
+      "condition": {
+        "typeReached": 
"org.apache.shardingsphere.sql.parser.engine.core.database.visitor.SQLStatementVisitorFactory"
+      },
+      "type": 
"org.apache.shardingsphere.sql.parser.engine.mysql.visitor.statement.type.MySQLDDLStatementVisitor",
+      "methods": [
+        {
+          "name": "<init>",
+          "parameterTypes": [
+            
"org.apache.shardingsphere.database.connector.core.type.DatabaseType"
+          ]
+        }
+      ]
     }
   ],
   "resources": [
diff --git 
a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/jdk-built-in-file-metadata/reachability-metadata.json
 
b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/jdk-built-in-file-metadata/reachability-metadata.json
index 9e1cb2f126c..0862a9a150a 100644
--- 
a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/jdk-built-in-file-metadata/reachability-metadata.json
+++ 
b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/jdk-built-in-file-metadata/reachability-metadata.json
@@ -1,5 +1,17 @@
 {
   "reflection": [
+    {
+      "condition": {
+        "typeReached": "javax.sql.rowset.spi.SyncFactory"
+      },
+      "type": "com.sun.rowset.providers.RIOptimisticProvider",
+      "methods": [
+        {
+          "name": "<init>",
+          "parameterTypes": []
+        }
+      ]
+    },
     {
       "condition": {
         "typeReached": "com.sun.jmx.mbeanserver.MBeanIntrospector"
@@ -234,5 +246,20 @@
         ]
       }
     }
+  ],
+  "resources": [
+    {
+      "condition": {
+        "typeReached": "com.sun.rowset.JdbcRowSetResourceBundle"
+      },
+      "bundle": "com.sun.rowset.RowSetResourceBundle"
+    },
+    {
+      "condition": {
+        "typeReached": "javax.sql.rowset.spi.SyncFactory"
+      },
+      "module": "java.sql.rowset",
+      "glob": "javax/sql/rowset/rowset.properties"
+    }
   ]
 }

Reply via email to