From 22e47efa30aa31643525751c5a2b8cb544e4c5fa Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Tue, 13 Feb 2024 23:24:15 +0100 Subject: [PATCH] Fix sdist verification in CI after we standardized packaging Airflow Sdist packages have been broken by #37340 and fixed by 37388, but we have not noticed it because CI check for sdist packages has been broken since #36537 where we standardized naming of the sdist packages to follow modern syntax (and we silently skipped installation because no providers were found),. This PR fixes it: * changes the naming format expected to follow the new standard * treats "no providers found as error" The "no providers" as success was useful at some point of time when we run sdist as part of regular PRs and some PRs resulted in "no providers changed" condition, however sdist verification only happens now in canary build (so all providers are affected) as well as we have if condition in the job itself to skip the step of installation if there are no providers. --- .../airflow_breeze/commands/release_management_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/breeze/src/airflow_breeze/commands/release_management_commands.py b/dev/breeze/src/airflow_breeze/commands/release_management_commands.py index c6f6f46732f05..a6dcec3aa3dd1 100644 --- a/dev/breeze/src/airflow_breeze/commands/release_management_commands.py +++ b/dev/breeze/src/airflow_breeze/commands/release_management_commands.py @@ -887,7 +887,7 @@ def generate_constraints( list_generated_constraints(output=None) -SDIST_FILENAME_PREFIX = "apache-airflow-providers-" +SDIST_FILENAME_PREFIX = "apache_airflow_providers_" WHEEL_FILENAME_PREFIX = "apache_airflow_providers-" SDIST_FILENAME_PATTERN = re.compile(rf"{SDIST_FILENAME_PREFIX}(.*)-[0-9].*\.tar\.gz") @@ -1033,7 +1033,7 @@ def install_provider_packages( provider_chunks = [chunk for chunk in provider_chunks if chunk] if not provider_chunks: get_console().print("[info]No providers to install") - return + sys.exit(1) total_num_providers = 0 for index, chunk in enumerate(provider_chunks): get_console().print(f"Chunk {index}: {chunk} ({len(chunk)} providers)")