Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion dev/README_RELEASE_PYTHON_CLIENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,10 @@ binary-reproduced when built from the sources.

1) Set versions of the packages to be checked:

Go to directory where your airflow sources are checked out and set the following environment variables:

```shell script
cd <directory where airflow is checked out>
export AIRFLOW_REPO_ROOT="$(pwd -P)"
VERSION=X.Y.Z
VERSION_SUFFIX=rc1
VERSION_RC=${VERSION}${VERSION_SUFFIX}
Expand Down Expand Up @@ -436,6 +438,10 @@ present in SVN. This command may also help with verifying installation of the pa
breeze release-management check-release-files python-client --version ${VERSION_RC}
```

You can also follow the docker check that installs the distribution in a docker container and verifies
that the package can be installed and imported correctly and print it's version. The command above prints
instructions on how to do that.


### Licence check

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4409,10 +4409,11 @@ def check_release_files(
create_docker(
PROVIDERS_DOCKER.format("RUN uv pip install --pre --system " + " ".join(f"'{p}'" for p in pips)),
dockerfile_path,
release_type,
)
elif release_type == "airflow":
missing_files = check_airflow_release(files, version)
create_docker(AIRFLOW_DOCKER.format(version, version), dockerfile_path)
create_docker(AIRFLOW_DOCKER.format(version, version), dockerfile_path, release_type)
elif release_type == "task-sdk":
missing_files = check_task_sdk_release(files, version)
if not version:
Expand All @@ -4422,13 +4423,14 @@ def check_release_files(
create_docker(
TASK_SDK_DOCKER.format(version, airflow_version, airflow_version, airflow_version),
dockerfile_path,
release_type,
)
elif release_type == "airflow-ctl":
missing_files = check_airflow_ctl_release(files, version)
create_docker(AIRFLOW_CTL_DOCKER.format(version), dockerfile_path)
create_docker(AIRFLOW_CTL_DOCKER.format(version), dockerfile_path, release_type)
elif release_type == "python-client":
missing_files = check_python_client_release(files, version)
create_docker(PYTHON_CLIENT_DOCKER.format(version), dockerfile_path)
create_docker(PYTHON_CLIENT_DOCKER.format(version), dockerfile_path, release_type)

if missing_files:
warn_of_missing_files(missing_files, str(directory))
Expand Down
11 changes: 8 additions & 3 deletions dev/breeze/src/airflow_breeze/utils/check_release_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
FROM python:3.10
# Install python-client
RUN pip install "apache-airflow-python-client=={}"
RUN pip install "apache-airflow-client=={}"
"""

Expand All @@ -83,16 +83,21 @@ def get_packages(packages_file: Path) -> list[tuple[str, str]]:
return packages


def create_docker(txt: str, output_file: Path):
def create_docker(txt: str, output_file: Path, release_type: str):
"""Generate Dockerfile for testing installation."""
output_file.write_text(txt)

console = get_console()
console.print("\n[bold]To check installation run:[/bold]")
command = (
'--entrypoint "airflow" local/airflow info'
if release_type != "python-client"
else '--entrypoint "bash" local/airflow "-c" "python -c \'import airflow_client.client; print(airflow_client.client.__version__)\'"'
)
console.print(
f"""\
docker build -f {output_file} --tag local/airflow .
docker run --rm --entrypoint "airflow" local/airflow info
docker run --rm {command}
docker image rm local/airflow
"""
)
Expand Down