utafrali commented on code in PR #12300:
URL: https://github.com/apache/seatunnel/pull/12300#discussion_r3999578445


##########
.github/workflows/cli.yml:
##########
@@ -0,0 +1,98 @@
+#
+# 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: SeaTunnel CLI
+
+on:
+  push:
+    branches:
+      - dev
+    paths:
+      - 'seatunnel-cli/**'
+      - '.github/workflows/cli.yml'
+  pull_request:
+    paths:
+      - 'seatunnel-cli/**'
+      - '.github/workflows/cli.yml'
+
+permissions:
+  contents: read
+
+concurrency:
+  group: cli-${{ github.event.pull_request.number || github.ref }}
+  cancel-in-progress: true
+
+defaults:
+  run:
+    working-directory: seatunnel-cli
+
+jobs:
+  lint:
+    name: Lint
+    runs-on: ubuntu-latest
+    timeout-minutes: 10
+    steps:
+      - uses: actions/checkout@v4
+
+      - name: Set up Python
+        uses: actions/setup-python@v5
+        with:
+          python-version: '3.10'
+          cache: pip
+          cache-dependency-path: seatunnel-cli/pyproject.toml
+
+      - name: Install ruff
+        run: python -m pip install --upgrade ruff

Review Comment:
   `pip install --upgrade ruff` always pulls the latest release. Because 
`pyproject.toml`'s `dev` extra also leaves ruff unpinned, the version in the 
lint job could differ from what a contributor gets locally — and a ruff release 
that adds checks under `E9`/`F82` would turn a previously green PR red with no 
code change.
   
   Consider either pinning ruff in the `dev` extra (e.g. `ruff>=0.8,<0.10`) so 
both paths resolve the same artifact, or replacing the separate install step 
with `pip install -e '.[dev]'` (the same command the test job uses). The latter 
also removes the redundant step entirely:
   
   ```yaml
   - name: Install seatunnel-cli with its dev dependencies
     run: |
       python -m pip install --upgrade pip
       python -m pip install -e '.[dev]'
   
   - name: Check for Python errors
     run: ruff check .
   ```



-- 
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]

Reply via email to