Skip to content

Commit

Permalink
Fix sdist verification in CI after we standardized packaging
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
potiuk committed Feb 13, 2024
1 parent 8b6f448 commit 22e47ef
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)")
Expand Down

0 comments on commit 22e47ef

Please sign in to comment.