This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 545d9e73a4a9 [SPARK-55287][INFRA] Consolidate steps in `lint`
545d9e73a4a9 is described below
commit 545d9e73a4a9f650209af886d17d81709c46e6f2
Author: Ruifeng Zheng <[email protected]>
AuthorDate: Mon Feb 2 06:47:45 2026 +0900
[SPARK-55287][INFRA] Consolidate steps in `lint`
### What changes were proposed in this pull request?
consolidate steps in lint
### Why are the changes needed?
to improve readability
### Does this PR introduce _any_ user-facing change?
no
### How was this patch tested?
ci
### Was this patch authored or co-authored using generative AI tooling?
no
Closes #54070 from zhengruifeng/lint_py312.
Authored-by: Ruifeng Zheng <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
---
.github/workflows/build_and_test.yml | 61 ++++++++++++++++++------------------
1 file changed, 30 insertions(+), 31 deletions(-)
diff --git a/.github/workflows/build_and_test.yml
b/.github/workflows/build_and_test.yml
index 309a15ce44c0..edf9a51057c4 100644
--- a/.github/workflows/build_and_test.yml
+++ b/.github/workflows/build_and_test.yml
@@ -819,6 +819,7 @@ jobs:
LANG: C.UTF-8
NOLINT_ON_COMPILE: false
GITHUB_PREV_SHA: ${{ github.event.before }}
+ BRANCH: ${{ inputs.branch }}
container:
image: ${{ needs.precondition.outputs.image_lint_url_link }}
steps:
@@ -878,23 +879,16 @@ jobs:
run: ./dev/mima
- name: Scala linter
run: ./dev/lint-scala
- - name: Scala structured logging check for branch-3.5 and branch-4.0
- if: inputs.branch == 'branch-3.5' || inputs.branch == 'branch-4.0'
- run: |
- if [ -f ./dev/structured_logging_style.py ]; then
- python3.9 ./dev/structured_logging_style.py
- fi
- - name: Scala structured logging check for branch-4.1
- if: inputs.branch == 'branch-4.1'
- run: |
- if [ -f ./dev/structured_logging_style.py ]; then
- python3.11 ./dev/structured_logging_style.py
- fi
- name: Scala structured logging check
- if: inputs.branch != 'branch-3.5' && inputs.branch != 'branch-4.0' &&
inputs.branch != 'branch-4.1'
+ if: hashFiles('dev/structured_logging_style.py') != ''
+ shell: 'script -q -e -c "bash {0}"'
run: |
- if [ -f ./dev/structured_logging_style.py ]; then
- python3.12 ./dev/structured_logging_style.py
+ if [[ "$BRANCH" == 'branch-3.5' || "$BRANCH" == 'branch-4.0' ]]; then
+ python3.9 ./dev/structured_logging_style.py
+ elif [[ "$BRANCH" == 'branch-4.1' ]]; then
+ python3.11 ./dev/structured_logging_style.py
+ else
+ python3.12 ./dev/structured_logging_style.py
fi
- name: Java linter
run: ./dev/lint-java
@@ -907,24 +901,29 @@ jobs:
# Should delete this section after SPARK 3.5 EOL.
python3.9 -m pip install 'flake8==3.9.0' pydata_sphinx_theme
'mypy==0.982' 'pytest==7.1.3' 'pytest-mypy-plugins==1.9.3' numpydoc
'jinja2<3.0.0' 'black==22.6.0'
python3.9 -m pip install 'pandas-stubs==1.2.0.53' ipython
'grpcio==1.56.0' 'grpc-stubs==1.24.11' 'googleapis-common-protos-stubs==2.2.0'
- - name: List Python packages for branch-3.5 and branch-4.0
- if: inputs.branch == 'branch-3.5' || inputs.branch == 'branch-4.0'
- run: python3.9 -m pip list
- - name: List Python packages for branch-4.1
- if: inputs.branch == 'branch-4.1'
- run: python3.11 -m pip list
- name: List Python packages
- if: inputs.branch != 'branch-3.5' && inputs.branch != 'branch-4.0' &&
inputs.branch != 'branch-4.1'
- run: python3.12 -m pip list
- - name: Python linter for branch-3.5 and branch-4.0
- if: inputs.branch == 'branch-3.5' || inputs.branch == 'branch-4.0'
- run: PYTHON_EXECUTABLE=python3.9 ./dev/lint-python
- - name: Python linter for branch-4.1
- if: inputs.branch == 'branch-4.1'
- run: PYTHON_EXECUTABLE=python3.11 ./dev/lint-python
+ shell: 'script -q -e -c "bash {0}"'
+ run: |
+ if [[ "$BRANCH" == 'branch-3.5' || "$BRANCH" == 'branch-4.0' ]]; then
+ python3.9 --version
+ python3.9 -m pip list
+ elif [[ "$BRANCH" == 'branch-4.1' ]]; then
+ python3.11 --version
+ python3.11 -m pip list
+ else
+ python3.12 --version
+ python3.12 -m pip list
+ fi
- name: Python linter
- if: inputs.branch != 'branch-3.5' && inputs.branch != 'branch-4.0' &&
inputs.branch != 'branch-4.1'
- run: PYTHON_EXECUTABLE=python3.12 ./dev/lint-python
+ shell: 'script -q -e -c "bash {0}"'
+ run: |
+ if [[ "$BRANCH" == 'branch-3.5' || "$BRANCH" == 'branch-4.0' ]]; then
+ PYTHON_EXECUTABLE=python3.9 ./dev/lint-python
+ elif [[ "$BRANCH" == 'branch-4.1' ]]; then
+ PYTHON_EXECUTABLE=python3.11 ./dev/lint-python
+ else
+ PYTHON_EXECUTABLE=python3.12 ./dev/lint-python
+ fi
# Should delete this section after SPARK 3.5 EOL.
- name: Install dependencies for Python code generation check for
branch-3.5
if: inputs.branch == 'branch-3.5'
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]