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

potiuk 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 5ee75fb19c Add better diagnostics when provider.yaml check fails 
(#37322)
5ee75fb19c is described below

commit 5ee75fb19c611531a8239c63f93edb6ce8311e21
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sun Feb 11 10:49:39 2024 +0100

    Add better diagnostics when provider.yaml check fails (#37322)
---
 scripts/ci/pre_commit/pre_commit_check_provider_yaml_files.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/scripts/ci/pre_commit/pre_commit_check_provider_yaml_files.py 
b/scripts/ci/pre_commit/pre_commit_check_provider_yaml_files.py
index 7c934c60fb..fcbe251291 100755
--- a/scripts/ci/pre_commit/pre_commit_check_provider_yaml_files.py
+++ b/scripts/ci/pre_commit/pre_commit_check_provider_yaml_files.py
@@ -17,6 +17,7 @@
 # under the License.
 from __future__ import annotations
 
+import os
 import sys
 from pathlib import Path
 
@@ -32,9 +33,10 @@ cmd_result = run_command_via_breeze_shell(
     warn_image_upgrade_needed=True,
     extra_env={"PYTHONWARNINGS": "default"},
 )
-if cmd_result.returncode != 0:
+if cmd_result.returncode != 0 and os.environ.get("CI") != "true":
     console.print(
-        "[warning]\nIf you see strange stacktraces above, "
-        "run `breeze ci-image build --python 3.8` and try again."
+        "\n[yellow]If you see strange stacktraces above, especially about 
missing imports "
+        "run this command:[/]\n"
     )
+    console.print("[magenta]breeze ci-image build --python 3.8 
--upgrade-to-newer-dependencies[/]\n")
 sys.exit(cmd_result.returncode)

Reply via email to