Skip to content

Commit

Permalink
Unhide CI instructions when dependencies need regeneration (apache#38748
Browse files Browse the repository at this point in the history
)

The instructions on what to do was hidden in a folded group and we
need to make sure it is printed straight in the output.

Also we should not print the nasty traceback, as it is not very
useul, the failing python command already prints appropriate
error/informational messages and there is no need to clutter the
output with the traceback when the command fails.
  • Loading branch information
potiuk authored Apr 4, 2024
1 parent fb7f82c commit 6172b44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dev/breeze/src/airflow_breeze/utils/md5_build_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def calculate_md5_checksum_for_files(
]
)
# Regenerate provider_dependencies.json
run_command(
result = run_command(
[
sys.executable,
os.fspath(
Expand All @@ -126,7 +126,10 @@ def calculate_md5_checksum_for_files(
),
],
cwd=AIRFLOW_SOURCES_ROOT,
check=False,
)
if result.returncode != 0:
sys.exit(result.returncode)
for file in FILES_FOR_REBUILD_CHECK:
is_modified = check_md5_sum_for_file(file, md5sum_cache_dir, update)
if is_modified:
Expand Down
2 changes: 2 additions & 0 deletions scripts/ci/pre_commit/update_providers_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ def check_if_different_provider_used(file_path: Path) -> None:
DEPENDENCIES_JSON_FILE_PATH.write_text(new_content)
if new_content != old_content:
if os.environ.get("CI"):
# make sure the message is printed outside the folded section
console.print("::endgroup::")
console.print()
console.print(f"There is a need to regenerate {DEPENDENCIES_JSON_FILE_PATH}")
console.print(
Expand Down

0 comments on commit 6172b44

Please sign in to comment.