This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch v2-8-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 380f03aeda3f4157b6b2aeb3255d3be7a62ee700 Author: Jarek Potiuk <[email protected]> AuthorDate: Sun Feb 11 10:49:39 2024 +0100 Add better diagnostics when provider.yaml check fails (#37322) (cherry picked from commit 5ee75fb19c611531a8239c63f93edb6ce8311e21) --- 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)
