You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2023/12/19 13:41:51 UTC
(airflow) 01/01: Less verbose information about changed provider.yaml files
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch less-verbose-provider-yaml-changed-message
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit b7a05788e490982b00790b320376a7a4a7beaeaa
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Tue Dec 19 14:38:51 2023 +0100
Less verbose information about changed provider.yaml files
When we attempt to see if provider.yaml files make changes in
dependencies, we print verbose information on what provider.yaml
files changeed, but this is not necessary or needed. This change
makes the output less verbose by detail - just a number of changed
files rather than full list of them - the full list is only printed
when `--verbose` flag is used.
---
dev/breeze/src/airflow_breeze/utils/md5_build_check.py | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/dev/breeze/src/airflow_breeze/utils/md5_build_check.py b/dev/breeze/src/airflow_breeze/utils/md5_build_check.py
index 9a43f6ea38..ba0374fa47 100644
--- a/dev/breeze/src/airflow_breeze/utils/md5_build_check.py
+++ b/dev/breeze/src/airflow_breeze/utils/md5_build_check.py
@@ -29,6 +29,7 @@ from airflow_breeze.global_constants import ALL_PROVIDER_YAML_FILES, FILES_FOR_R
from airflow_breeze.utils.console import get_console
from airflow_breeze.utils.path_utils import AIRFLOW_SOURCES_ROOT
from airflow_breeze.utils.run_utils import run_command
+from airflow_breeze.utils.shared_options import get_verbose
if TYPE_CHECKING:
from airflow_breeze.params.build_ci_params import BuildCiParams
@@ -102,11 +103,15 @@ def calculate_md5_checksum_for_files(
if modified_provider_yaml_files:
get_console().print(
"[info]Attempting to generate provider dependencies. "
- "Provider yaml files changed since last check:[/]"
- )
- get_console().print(
- [os.fspath(file.relative_to(AIRFLOW_SOURCES_ROOT)) for file in modified_provider_yaml_files]
+ f"{len(modified_provider_yaml_files)} provider.yaml file(s) changed since last check:[/]"
)
+ if get_verbose():
+ get_console().print(
+ [
+ os.fspath(file.relative_to(AIRFLOW_SOURCES_ROOT))
+ for file in modified_provider_yaml_files
+ ]
+ )
# Regenerate provider_dependencies.json
run_command(
[