This is an automated email from the ASF dual-hosted git repository.
hello-stephen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 70808c386c5 [chore](build) Rely on FE compilation for Java Checkstyle
(#71382)
70808c386c5 is described below
commit 70808c386c5620a2006623956b3057dcf7952df4
Author: shuke <[email protected]>
AuthorDate: Fri Dec 4 00:28:55 2026 +0800
[chore](build) Rely on FE compilation for Java Checkstyle (#71382)
### Background
The TeamCity FE compile runs Maven Checkstyle during the `validate`
phase. GitHub Actions also runs `mvn clean checkstyle:check` for FE
changes. On December 3, from 00:00 through 19:54 UTC+8, the Java step in
the master Code Style workflow used 3 h 49 min across 78 executions.
### What problem does this PR solve?
Issue Number: None
Related PR: None
PR Type: Build/CI/Chore
Remove the Java step, its JDK setup and its path selection from Code
Style. Remove the legacy standalone FE Checkstyle workflow from master.
Code Style continues to run the license, secret, large-file and
applicable Clang checks.
### Details
- **Coverage.** A comparison on the same master PR revision found one
Java module checked only by the GitHub workflow,
`fe-authentication-plugin-ldap`. This change accepts that gap and uses
the module set covered by FE compilation. [GitHub
job](https://github.com/apache/doris/actions/runs/47039352707/job/144023490769)
ยท [TeamCity
compile](http://doris-ci.com/builds/agent-test/26366/index.html)
- **Release branch rollout.** The ASF configuration on master manages
the required checks for release branches. Remove the standalone
`CheckStyle` requirement for 4.1 and 4.2. Allow this ruleset update to
take effect before merging the separate PRs that delete those release
workflows. Both branches continue to require `TeamCity/compile`.
### Testing
Ran all 17 tests in `.github/scripts/test_pr_workflow_event.py` and
exercised seven path-selection scenarios, including renamed C++ files,
FE-only changes, and incomplete change lists. Verified that the ruleset
diff removes only the intended 4.1/4.2 context. `git diff --check`
passed.
### Release note
None.
### Check List (For Author)
- Behavior changed: CI only.
- Does this need documentation: No.
- Pre-submission status: Ready for review.
### AI Disclosure
- Tool: OpenAI Codex.
- Generated: Workflow and ruleset edits, local validation, and this
description.
- Human review: The requester confirmed the scope and accepted the LDAP
coverage change.
---
.asf.yaml | 1 -
.github/workflows/checkstyle.yaml | 77 ---------------------------------------
.github/workflows/code-style.yml | 26 +++----------
3 files changed, 5 insertions(+), 99 deletions(-)
diff --git a/.asf.yaml b/.asf.yaml
index aba612f22bd..7d9f4f4a938 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -103,7 +103,6 @@ github:
required_status_checks:
- context: License Check
- context: Clang Formatter
- - context: CheckStyle
- context: Build Broker
- context: TeamCity/feut
- context: TeamCity/beut
diff --git a/.github/workflows/checkstyle.yaml
b/.github/workflows/checkstyle.yaml
deleted file mode 100644
index 47459d728b6..00000000000
--- a/.github/workflows/checkstyle.yaml
+++ /dev/null
@@ -1,77 +0,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.
-#
----
-name: FE Code Style Checker
-
-on:
- pull_request:
- workflow_dispatch:
-
-permissions:
- contents: read
- pull-requests: read
-
-jobs:
- java-checkstyle:
- name: "CheckStyle"
- runs-on: ubuntu-24.04
- concurrency:
- group: fe-code-style-${{ github.event.pull_request.number ||
github.run_id }}-${{ github.sha }}
- cancel-in-progress: true
- if: github.event_name == 'pull_request' && github.base_ref != 'master'
- steps:
- - name: Verify current PR head
- env:
- GH_TOKEN: ${{ github.token }}
- PR_NUMBER: ${{ github.event.pull_request.number }}
- EXPECTED_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- run: |
- current_head_sha=$(gh api
"repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}" --jq '.head.sha')
- if [[ "${current_head_sha}" != "${EXPECTED_HEAD_SHA}" ]]; then
- echo "::error::PR #${PR_NUMBER} moved from ${EXPECTED_HEAD_SHA} to
${current_head_sha}; refusing stale validation"
- exit 1
- fi
-
- - name: Checkout
- uses: actions/checkout@v3
- with:
- persist-credentials: false
- submodules: recursive
-
- - name: Paths Filter
- uses: ./.github/actions/paths-filter
- id: filter
- with:
- filters: |
- fe_changes:
- - 'fe/**'
- - 'gensrc/proto/**'
- - 'gensrc/thrift/**'
-
- - name: Set up JDK with Maven
- if: steps.filter.outputs.fe_changes == 'true'
- uses: actions/setup-java@v4
- with:
- distribution: 'temurin'
- java-version: '17'
- cache: 'maven'
-
- - name: Run java checkstyle
- if: steps.filter.outputs.fe_changes == 'true'
- run:
- cd fe && mvn clean checkstyle:check
diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml
index 0c118079a86..2b81673f5a2 100644
--- a/.github/workflows/code-style.yml
+++ b/.github/workflows/code-style.yml
@@ -46,7 +46,7 @@ jobs:
exit 1
fi
- - name: Select checks for the PR snapshot
+ - name: Select Clang Formatter for the PR snapshot
id: paths
env:
GH_TOKEN: ${{ github.token }}
@@ -54,7 +54,7 @@ jobs:
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
shell: bash
run: |
- # The first compare page lists at most 300 files. At the limit, run
both checks.
+ # The first compare page lists at most 300 files. At the limit, run
Clang Formatter.
files="$RUNNER_TEMP/code-style-files.json"
if ! gh api
"repos/$GITHUB_REPOSITORY/compare/$BASE_SHA...$HEAD_SHA?per_page=1" \
--jq '{merge_base: .merge_base_commit.sha, files: (.files |
map({filename, previous_filename, status, sha}))}' > "$files" ||
@@ -62,11 +62,10 @@ jobs:
.files | select(type == "array" and length < 300)
| [.[] | .filename, (.previous_filename // empty)]
| any(.[]; . == ".github/workflows/code-style.yml") as $workflow
- | ($workflow or any(.[]; test("^(fe/|gensrc/(proto|thrift)/)")))
as $java
| ($workflow or any(.[]; test("^(be|cloud)/(src|test)/"))) as
$cpp
- | "java=\($java)\ncpp=\($cpp)"' "$files"); then
- echo "::warning::Changed paths unavailable or incomplete; running
both style checks"
- selection=$'java=true\ncpp=true'
+ | "cpp=\($cpp)"' "$files"); then
+ echo "::warning::Changed paths unavailable or incomplete; running
Clang Formatter"
+ selection='cpp=true'
fi
printf '%s\n' "$selection" >> "$GITHUB_OUTPUT"
@@ -189,18 +188,3 @@ jobs:
source: 'be/src be/test cloud/src cloud/test'
clangFormatVersion: 16
inplace: false
-
- - name: Set up JDK with Maven
- id: jdk
- # Report Java violations even if the C++ check failed on the same PR.
- if: "!cancelled() && steps.source.outcome == 'success' &&
steps.paths.outputs.java == 'true'"
- uses: actions/setup-java@v4
- with:
- distribution: temurin
- java-version: '17'
- cache: maven
-
- - name: Run Java CheckStyle
- if: "!cancelled() && steps.jdk.outcome == 'success'"
- working-directory: fe
- run: mvn clean checkstyle:check
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]