FrankChen021 commented on code in PR #20560:
URL: https://github.com/apache/druid/pull/20560#discussion_r4258616107


##########
.github/workflows/stability.yml:
##########
@@ -0,0 +1,70 @@
+# 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.
+
+# See dev/stability-runner.md
+
+name: "Stability Runner"
+
+on:
+  workflow_dispatch:
+    inputs:
+      maven_args:
+        description: "Maven arguments for both install and test phases (e.g. 
-pl embedded-tests -Dtest=KafkaIndexFaultToleranceTest)"
+        required: true
+        type: string
+      jdk:
+        description: "JDK version"
+        default: "25"
+        type: string
+  workflow_call:
+    inputs:
+      maven_args:
+        required: true
+        type: string
+      jdk:
+        required: false
+        type: string
+        default: "25"
+      id:
+        description: "Distinguishes the check names of concurrent runs on the 
same commit"
+        required: false
+        type: string
+        default: ""
+
+jobs:
+  # maven_args land in a shell line - refuse anything the shell would 
interpret.
+  check:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v6
+        with:
+          sparse-checkout: .github/scripts
+      - name: Check Maven arguments
+        env:
+          RAW_ARGS: ${{ inputs.maven_args }}
+        run: printf '%s' "$RAW_ARGS" | .github/scripts/check-shell-args
+
+  stability:
+    needs: check
+    strategy:
+      fail-fast: false
+      matrix:
+        shard: [1, 2, 3, 4, 5, 6, 7, 8]
+    uses: ./.github/workflows/worker.yml

Review Comment:
   [P2] Publish the documented stability report checks
   
   **Finding:** Defect: Each new shard delegates reporting to `worker.yml`, 
whose JUnit step is hard-coded with `annotate_only: true`. Trigger: any 
stability run that reaches report publication; that mode suppresses Check Run 
creation even though `check_name` is set. Impact: the documented `Test Report - 
stability-[<id>-]shard-<N>` checks are never emitted, leaving only annotations, 
artifacts, and job status.
   
   **Suggestion:** Add a worker switch or dedicated stability report step that 
enables normal check publication for these shards, with the required checks 
permission.



##########
.github/scripts/run-stability:
##########
@@ -0,0 +1,69 @@
+#!/bin/bash
+
+# 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.
+
+# Usage: run-stability <maven arguments...>
+
+set -e
+
+if [ "$#" -eq 0 ]; then
+    echo "Usage: $0 <maven arguments...>" >&2
+    exit 1
+fi
+ARGS=("$@")
+
+set -x
+
+RUNS=8
+
+OPTS="-Dsurefire.failIfNoSpecifiedTests=false -Pci,skip-static-checks 
-Dweb.console.skip=true"

Review Comment:
   [P1] Reject stability runs that execute zero tests
   
   **Finding:** Defect: The runner sets 
`-Dsurefire.failIfNoSpecifiedTests=false` and has no post-run assertion that 
any test executed. Trigger: a typo or stale class/method in `-Dtest` (or 
another selector matching nothing) lets every Maven `test` invocation succeed 
without producing a JUnit report, so the worker skips report publication. 
Impact: all eight iterations can finish green without exercising the requested 
test.
   
   **Suggestion:** Track executed tests or generated results and fail when the 
complete run executes zero tests, while retaining the reactor-friendly setting 
only where needed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to