This is an automated email from the ASF dual-hosted git repository.

jedcunningham pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 0905e386f1 Fix errors revealed on autoupgrade of breeze (#24612)
0905e386f1 is described below

commit 0905e386f17e34d96f6ee575404c62b13242c75d
Author: Jarek Potiuk <[email protected]>
AuthorDate: Thu Jun 23 02:37:40 2022 +0200

    Fix errors revealed on autoupgrade of breeze (#24612)
    
    Recent changes to Breeze cause it to fail in certain situations,
    especially at self-upgrade (which was generated by today's
    upgrade with rich-click).
    
    There were two problems:
    
    * docker volume inspect missed 'volume' and it caused sometimes
      failures in CI
    
    * inputimeout dependency was missing after recent update to
      pre-commit venvs
---
 .pre-commit-config.yaml                           | 16 ++++++++--------
 dev/breeze/src/airflow_breeze/utils/path_utils.py |  4 +++-
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index fc72d47c25..ee5c4f6e20 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -809,7 +809,7 @@ repos:
         entry: ./scripts/ci/pre_commit/pre_commit_mypy.py
         files: ^dev/.*\.py$
         require_serial: true
-        additional_dependencies: ['rich>=12.4.4']
+        additional_dependencies: ['rich>=12.4.4', 'inputimeout']
       - id: run-mypy
         name: Run mypy for core
         language: python
@@ -817,14 +817,14 @@ repos:
         files: \.py$
         exclude: 
^provider_packages|^docs|^airflow/_vendor/|^airflow/providers|^airflow/migrations|^dev
         require_serial: true
-        additional_dependencies: ['rich>=12.4.4']
+        additional_dependencies: ['rich>=12.4.4', 'inputimeout']
       - id: run-mypy
         name: Run mypy for providers
         language: python
         entry: ./scripts/ci/pre_commit/pre_commit_mypy.py --namespace-packages
         files: ^airflow/providers/.*\.py$
         require_serial: true
-        additional_dependencies: ['rich>=12.4.4']
+        additional_dependencies: ['rich>=12.4.4', 'inputimeout']
       - id: run-mypy
         name: Run mypy for /docs/ folder
         language: python
@@ -832,7 +832,7 @@ repos:
         files: ^docs/.*\.py$
         exclude: ^docs/rtd-deprecation
         require_serial: true
-        additional_dependencies: ['rich>=12.4.4']
+        additional_dependencies: ['rich>=12.4.4', 'inputimeout']
       - id: run-flake8
         name: Run flake8
         language: python
@@ -840,7 +840,7 @@ repos:
         files: \.py$
         pass_filenames: true
         exclude: ^airflow/_vendor/
-        additional_dependencies: ['rich>=12.4.4']
+        additional_dependencies: ['rich>=12.4.4', 'inputimeout']
       - id: lint-javascript
         name: ESLint against airflow/ui
         language: python
@@ -848,7 +848,7 @@ repos:
         files: ^airflow/ui/
         entry: ./scripts/ci/pre_commit/pre_commit_ui_lint.py
         pass_filenames: false
-        additional_dependencies: ['rich>=12.4.4']
+        additional_dependencies: ['rich>=12.4.4', 'inputimeout']
       - id: lint-javascript
         name: ESLint against current UI JavaScript files
         language: python
@@ -856,12 +856,12 @@ repos:
         files: ^airflow/www/static/js/
         entry: ./scripts/ci/pre_commit/pre_commit_www_lint.py
         pass_filenames: false
-        additional_dependencies: ['rich>=12.4.4']
+        additional_dependencies: ['rich>=12.4.4', 'inputimeout']
       - id: update-migration-references
         name: Update migration ref doc
         language: python
         entry: ./scripts/ci/pre_commit/pre_commit_migration_reference.py
         pass_filenames: false
         files: 
^airflow/migrations/versions/.*\.py$|^docs/apache-airflow/migrations-ref\.rst$
-        additional_dependencies: ['rich>=12.4.4']
+        additional_dependencies: ['rich>=12.4.4', 'inputimeout']
         ## ONLY ADD PRE-COMMITS HERE THAT REQUIRE CI IMAGE
diff --git a/dev/breeze/src/airflow_breeze/utils/path_utils.py 
b/dev/breeze/src/airflow_breeze/utils/path_utils.py
index 9520306546..da097700fd 100644
--- a/dev/breeze/src/airflow_breeze/utils/path_utils.py
+++ b/dev/breeze/src/airflow_breeze/utils/path_utils.py
@@ -255,7 +255,9 @@ BREEZE_SOURCES_ROOT = AIRFLOW_SOURCES_ROOT / "dev" / 
"breeze"
 def create_volume_if_missing(volume_name: str):
     from airflow_breeze.utils.run_utils import run_command
 
-    res_inspect = run_command(cmd=["docker", "inspect", volume_name], 
stdout=subprocess.DEVNULL, check=False)
+    res_inspect = run_command(
+        cmd=["docker", "volume", "inspect", volume_name], 
stdout=subprocess.DEVNULL, check=False
+    )
     if res_inspect.returncode != 0:
         run_command(cmd=["docker", "volume", "create", volume_name], 
check=True)
 

Reply via email to