You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jscheffl (via GitHub)" <gi...@apache.org> on 2025/10/23 22:09:01 UTC

[PR] Extract prek hooks for Common.Compat provider [airflow]

jscheffl opened a new pull request, #57183:
URL: https://github.com/apache/airflow/pull/57183

   Fast follower of https://github.com/apache/airflow/pull/57181
   
   As prek is supporting monorepo now and go SDK was the front-runner, common-compat provider is now the next piece that with this PR is proposed to be split-out from global pre-commit hook list into the provider space.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Extract prek hooks for Common.Compat provider [airflow]

Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil merged PR #57183:
URL: https://github.com/apache/airflow/pull/57183


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Extract prek hooks for Common.Compat provider [airflow]

Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl commented on code in PR #57183:
URL: https://github.com/apache/airflow/pull/57183#discussion_r2458968289


##########
providers/common/compat/.pre-commit-config.yaml:
##########
@@ -0,0 +1,28 @@
+# 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.
+---
+default_stages: [pre-commit, pre-push]
+minimum_prek_version: '0.0.28'
+repos:
+  - repo: local
+    hooks:
+      - id: check-common-compat-sdk-imports-in-sync
+        name: Check common.compat sdk TYPE_CHECKING matches runtime maps
+        language: python
+        files: ^src/airflow/providers/common/compat/sdk\.py$
+        pass_filenames: false
+        entry: ../../scripts/ci/prek/check_common_compat_lazy_imports.py

Review Comment:
   Sorry, another uups, you are right, common compat is three levels deep...



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Extract prek hooks for Common.Compat provider [airflow]

Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl commented on code in PR #57183:
URL: https://github.com/apache/airflow/pull/57183#discussion_r2457611601


##########
providers/common/compat/.pre-commit-config.yaml:
##########
@@ -0,0 +1,28 @@
+# 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.
+---
+default_stages: [pre-commit, pre-push]
+minimum_prek_version: '0.0.28'
+repos:
+  - repo: local
+    hooks:
+      - id: check-common-compat-sdk-imports-in-sync
+        name: Check common.compat sdk TYPE_CHECKING matches runtime maps
+        language: python
+        files: ^providers/common/compat/src/airflow/providers/common/compat/sdk\.py$

Review Comment:
   Uuuups
   ```suggestion
           files: ^src/airflow/providers/common/compat/sdk\.py$
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Extract prek hooks for Common.Compat provider [airflow]

Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on code in PR #57183:
URL: https://github.com/apache/airflow/pull/57183#discussion_r2457700836


##########
providers/common/compat/.pre-commit-config.yaml:
##########
@@ -0,0 +1,28 @@
+# 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.
+---
+default_stages: [pre-commit, pre-push]
+minimum_prek_version: '0.0.28'
+repos:
+  - repo: local
+    hooks:
+      - id: check-common-compat-sdk-imports-in-sync
+        name: Check common.compat sdk TYPE_CHECKING matches runtime maps
+        language: python
+        files: ^src/airflow/providers/common/compat/sdk\.py$
+        pass_filenames: false
+        entry: ../../scripts/ci/prek/check_common_compat_lazy_imports.py

Review Comment:
   https://github.com/apache/airflow/actions/runs/18763532720/job/53534231554?pr=57183
   ```
   Run prek --all-files --show-diff-on-failure --color always
     prek --all-files --show-diff-on-failure --color always
     shell: /usr/bin/bash -e {0}
     env:
       PYTHON_MAJOR_MINOR_VERSION: 3.10
       UPGRADE_TO_NEWER_DEPENDENCIES: false
       GITHUB_TOKEN: ***
       pythonLocation: /opt/hostedtoolcache/Python/3.10.19/x64
       PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.19/x64/lib/pkgconfig
       Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.19/x64
       Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.19/x64
       Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.19/x64
       LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.19/x64/lib
       VERBOSE: false
       SKIP: check-provider-yaml-valid,flynt,identity,lint-helm-chart,ts-compile-lint-simple-auth-manager-ui,ts-compile-lint-ui
       COLUMNS: 202
       SKIP_GROUP_OUTPUT: true
       DEFAULT_BRANCH: main
       RUFF_FORMAT: github
   Running hooks for `providers/common/compat`:
   error: Failed to run hook `check-common-compat-sdk-imports-in-sync`
     caused by: run command `python hook` failed
     caused by: No such file or directory (os error 2)
   Check common.compat sdk TYPE_CHECKING matches runtime maps.......................
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Extract prek hooks for Common.Compat provider [airflow]

Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on code in PR #57183:
URL: https://github.com/apache/airflow/pull/57183#discussion_r2457699923


##########
providers/common/compat/.pre-commit-config.yaml:
##########
@@ -0,0 +1,28 @@
+# 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.
+---
+default_stages: [pre-commit, pre-push]
+minimum_prek_version: '0.0.28'
+repos:
+  - repo: local
+    hooks:
+      - id: check-common-compat-sdk-imports-in-sync
+        name: Check common.compat sdk TYPE_CHECKING matches runtime maps
+        language: python
+        files: ^src/airflow/providers/common/compat/sdk\.py$
+        pass_filenames: false
+        entry: ../../scripts/ci/prek/check_common_compat_lazy_imports.py

Review Comment:
   ```suggestion
           entry: ../../../scripts/ci/prek/check_common_compat_lazy_imports.py
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org