Skip to content

Commit 363da19

Browse files
committed
feat: add Spanner guards, fix group commit filtering, clean up artifacts
- JdbcAdminCaseSensitivityIntegrationTest: disable rename, FLOAT index, alter column type, BLOB index tests for Spanner - JdbcAdminImportTableIntegrationTest: disable alter column type and widening conversion tests for Spanner - Remove group_commit_tests duplication: filter tests list at runtime to only include *ConsensusCommit* classes in group_commit flavor - Skip group_commit jobs entirely when no ConsensusCommit tests exist - Prefix binary result artifacts with internal_ for clarity - Upload per-job HTML reports alongside binary results - Delete internal artifacts after successful aggregation
1 parent befa4e5 commit 363da19

1 file changed

Lines changed: 31 additions & 37 deletions

File tree

.github/workflows/spanner-adapter-check.yaml

Lines changed: 31 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -50,32 +50,26 @@ jobs:
5050
- name: JdbcAdminIntegrationTest
5151
label: spanner_admin
5252
tests: "JdbcAdminIntegrationTest"
53-
group_commit_tests: ""
5453

5554
- name: ConsensusCommitSpecific
5655
label: spanner_cc_specific
5756
tests: "ConsensusCommitSpecificIntegrationTestWithJdbcDatabase"
58-
group_commit_tests: "ConsensusCommitSpecificIntegrationTestWithJdbcDatabase"
5957

6058
- name: ConsensusCommitSpecific (highest isolation)
6159
label: spanner_cc_specific_highest
6260
tests: "ConsensusCommitSpecificIntegrationTestWithJdbcDatabaseInHighestIsolation"
63-
group_commit_tests: "ConsensusCommitSpecificIntegrationTestWithJdbcDatabaseInHighestIsolation"
6461

6562
- name: ConsensusCommitSpecific (metadata decoupling)
6663
label: spanner_cc_specific_md
6764
tests: "ConsensusCommitSpecificWithMetadataDecouplingIntegrationTestWithJdbcDatabase"
68-
group_commit_tests: "ConsensusCommitSpecificWithMetadataDecouplingIntegrationTestWithJdbcDatabase"
6965

7066
- name: MultipleClusteringKeyScan
7167
label: spanner_multi_ck_scan
7268
tests: "JdbcDatabaseMultipleClusteringKeyScanIntegrationTest"
73-
group_commit_tests: ""
7469

7570
- name: ConditionalMutation
7671
label: spanner_cond_mutation
7772
tests: "JdbcDatabaseConditionalMutationIntegrationTest"
78-
group_commit_tests: ""
7973

8074
# --- Group 1: Admin and import tests (~26m) ---
8175

@@ -92,13 +86,6 @@ jobs:
9286
JdbcAdminRepairIntegrationTest
9387
JdbcSchemaLoaderImportIntegrationTest
9488
JdbcSchemaLoaderImportWithMetadataDecouplingIntegrationTest
95-
group_commit_tests: >-
96-
ConsensusCommitAdminIntegrationTestWithJdbcDatabase
97-
ConsensusCommitAdminRepairIntegrationTestWithJdbcDatabase
98-
ConsensusCommitAdminImportTableIntegrationTestWithJdbcDatabase
99-
ConsensusCommitAdminImportTableWithMetadataDecouplingIntegrationTestWithJdbcDatabase
100-
ConsensusCommitImportTableIntegrationTestWithJdbcDatabase
101-
ConsensusCommitImportTableWithMetadataDecouplingIntegrationTestWithJdbcDatabase
10289
10390
# --- Group 2: Core JDBC database tests (~12m) ---
10491

@@ -112,7 +99,6 @@ jobs:
11299
JdbcDatabaseSinglePartitionKeyIntegrationTest
113100
JdbcDatabaseMultiplePartitionKeyIntegrationTest
114101
JdbcDatabaseSecondaryIndexIntegrationTest
115-
group_commit_tests: ""
116102
117103
# --- Group 3: Schema, i18n, virtual tables (~25m) ---
118104

@@ -127,9 +113,9 @@ jobs:
127113
JdbcAdminCaseSensitivityIntegrationTest
128114
JdbcSchemaLoaderIntegrationTest
129115
JdbcSchemaLoaderWithMetadataDecouplingIntegrationTest
130-
group_commit_tests: ""
131116
132117
# --- Group 4: ConsensusCommit base + TwoPhase + SingleCrud (~15m) ---
118+
# Group commit filters to *ConsensusCommit* only (excludes TwoPhase and SingleCrud)
133119

134120
- name: "CC base & TwoPhase & SingleCrud"
135121
label: spanner_group4
@@ -146,22 +132,24 @@ jobs:
146132
TwoPhaseConsensusCommitWithIncludeMetadataEnabledIntegrationTestWithJdbcDatabase
147133
SingleCrudOperationTransactionIntegrationTestWithJdbcDatabase
148134
SingleCrudOperationTransactionAdminIntegrationTestWithJdbcDatabase
149-
# TwoPhaseConsensusCommit excluded: group commit is incompatible with two-phase commit interface
150-
group_commit_tests: >-
151-
ConsensusCommitIntegrationTestWithJdbcDatabase
152-
ConsensusCommitIntegrationTestWithJdbcDatabaseInHighestIsolation
153-
ConsensusCommitCrossPartitionScanIntegrationTestWithJdbcDatabase
154-
ConsensusCommitNullMetadataIntegrationTestWithJdbcDatabase
155-
ConsensusCommitWithIncludeMetadataEnabledIntegrationTestWithJdbcDatabase
156-
ConsensusCommitWithMetadataDecouplingIntegrationTestWithJdbcDatabase
157135
158136
steps:
159137
- name: Check if job should run
160138
id: should-run
161139
run: |
162-
if [ "${{ matrix.group_commit_enabled }}" = "true" ] && [ -z "${{ matrix.test_group.group_commit_tests }}" ]; then
163-
echo "skip=true" >> "$GITHUB_OUTPUT"
164-
echo "Skipping: no ConsensusCommit tests in this group"
140+
# For group_commit flavor, filter tests to only *ConsensusCommit* classes
141+
# Skip entirely if no ConsensusCommit tests exist in this group
142+
if [ "${{ matrix.group_commit_enabled }}" = "true" ]; then
143+
CC_TESTS=""
144+
for test_class in ${{ matrix.test_group.tests }}; do
145+
case "${test_class}" in *ConsensusCommit*) CC_TESTS="${CC_TESTS} ${test_class}" ;; esac
146+
done
147+
if [ -z "${CC_TESTS}" ]; then
148+
echo "skip=true" >> "$GITHUB_OUTPUT"
149+
echo "Skipping: no ConsensusCommit tests in this group"
150+
else
151+
echo "skip=false" >> "$GITHUB_OUTPUT"
152+
fi
165153
else
166154
echo "skip=false" >> "$GITHUB_OUTPUT"
167155
fi
@@ -239,16 +227,12 @@ jobs:
239227
ORG_GRADLE_PROJECT_integrationTestJavaRuntimeVersion: "${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}"
240228
ORG_GRADLE_PROJECT_integrationTestJavaRuntimeVendor: "${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}"
241229
run: |
242-
# Select test list: use group_commit_tests when group commit is enabled, otherwise use tests
243-
if [ "${{ matrix.group_commit_enabled }}" = "true" ]; then
244-
TEST_LIST="${{ matrix.test_group.group_commit_tests }}"
245-
else
246-
TEST_LIST="${{ matrix.test_group.tests }}"
247-
fi
248-
249-
# Build the --tests arguments from the space-separated test list
230+
# Build the --tests arguments; for group_commit, filter to *ConsensusCommit* only
250231
TESTS_ARGS=""
251-
for test_class in ${TEST_LIST}; do
232+
for test_class in ${{ matrix.test_group.tests }}; do
233+
if [ "${{ matrix.group_commit_enabled }}" = "true" ]; then
234+
case "${test_class}" in *ConsensusCommit*) ;; *) continue ;; esac
235+
fi
252236
TESTS_ARGS="${TESTS_ARGS} --tests ${test_class}"
253237
done
254238
@@ -267,7 +251,7 @@ jobs:
267251
if: ${{ always() && steps.should-run.outputs.skip == 'false' }}
268252
uses: actions/upload-artifact@v7
269253
with:
270-
name: test-results_${{ matrix.test_group.label }}_${{ matrix.group_commit_enabled == 'true' && 'group_commit' || 'default' }}
254+
name: internal_test-results_${{ matrix.test_group.label }}_${{ matrix.group_commit_enabled == 'true' && 'group_commit' || 'default' }}
271255
path: core/build/test-results/integrationTestJdbc/
272256

273257
- name: Upload HTML test report
@@ -303,10 +287,11 @@ jobs:
303287
- name: Download all ${{ matrix.flavor }} test results
304288
uses: actions/download-artifact@v4
305289
with:
306-
pattern: test-results_*_${{ matrix.flavor }}
290+
pattern: internal_test-results_*_${{ matrix.flavor }}
307291
path: downloaded-results/
308292

309293
- name: Generate aggregated HTML report
294+
id: aggregate-report
310295
run: |
311296
# Create an init script that registers an aggregate TestReport task
312297
cat > /tmp/aggregate-init.gradle << 'EOF'
@@ -333,3 +318,12 @@ jobs:
333318
with:
334319
name: spanner_ci_${{ matrix.flavor }}_report_${{ env.ARTIFACT_SUFFIX }}_run_#${{ github.run_attempt }}
335320
path: build/reports/tests/aggregated/
321+
322+
- name: Delete per-job binary and HTML report artifacts
323+
if: steps.aggregate-report.outcome == 'success'
324+
uses: geekyeggo/delete-artifact@v6
325+
with:
326+
name: |
327+
internal_test-results_*_${{ matrix.flavor }}
328+
*_${{ matrix.flavor }}_report_${{ env.ARTIFACT_SUFFIX }}
329+
failOnError: false

0 commit comments

Comments
 (0)