Skip to content

Commit

Permalink
Add better diagnostics when provider.yaml check fails (#37322)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5ee75fb)
  • Loading branch information
potiuk committed Feb 13, 2024
1 parent 294f22e commit 380f03a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/ci/pre_commit/pre_commit_check_provider_yaml_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# under the License.
from __future__ import annotations

import os
import sys
from pathlib import Path

Expand All @@ -32,9 +33,10 @@
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)

0 comments on commit 380f03a

Please sign in to comment.