This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch v3-0-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-0-test by this push:
new cc80c660111 Fix Python client release steps (#50770)
cc80c660111 is described below
commit cc80c660111e89949fe379efabb4a88832cc4d1b
Author: Kaxil Naik <[email protected]>
AuthorDate: Mon May 19 20:54:58 2025 +0530
Fix Python client release steps (#50770)
Updated docs & gitignore generation.
(cherry picked from commit a531da4828b69e02a1e073cae8d60ed31da45303)
---
clients/python/.gitignore | 1 +
clients/python/pyproject.toml | 2 +-
clients/python/{.gitignore => python-client.gitignore} | 4 +---
dev/README_RELEASE_PYTHON_CLIENT.md | 1 -
.../commands/release_management_commands.py | 15 +++++++++++----
5 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/clients/python/.gitignore b/clients/python/.gitignore
index 7bf956fe558..d3066180e5f 100644
--- a/clients/python/.gitignore
+++ b/clients/python/.gitignore
@@ -4,6 +4,7 @@
/test
/tmp
/v1.yaml
+/v2.yaml
/.coverage
/apache_airflow_client.egg-info/
/.idea
diff --git a/clients/python/pyproject.toml b/clients/python/pyproject.toml
index c1f30445ada..ec4baeb1f55 100644
--- a/clients/python/pyproject.toml
+++ b/clients/python/pyproject.toml
@@ -52,7 +52,7 @@ classifiers = [
dependencies = [
"pydantic >= 2.11.0",
"python-dateutil",
- "urllib3 >= 1.25.3",
+ "urllib3 >= 2.1.0",
]
[project.urls]
diff --git a/clients/python/.gitignore b/clients/python/python-client.gitignore
similarity index 71%
copy from clients/python/.gitignore
copy to clients/python/python-client.gitignore
index 7bf956fe558..0ea1e518631 100644
--- a/clients/python/.gitignore
+++ b/clients/python/python-client.gitignore
@@ -1,9 +1,7 @@
-/airflow_client
-/docs
/dist
-/test
/tmp
/v1.yaml
+/v2.yaml
/.coverage
/apache_airflow_client.egg-info/
/.idea
diff --git a/dev/README_RELEASE_PYTHON_CLIENT.md
b/dev/README_RELEASE_PYTHON_CLIENT.md
index dd8072da8f5..126f9ebe9d2 100644
--- a/dev/README_RELEASE_PYTHON_CLIENT.md
+++ b/dev/README_RELEASE_PYTHON_CLIENT.md
@@ -48,7 +48,6 @@ The client versioning is independent of the Airflow
versioning.
The Python client is generated using Airflow's [openapi
spec](https://github.com/apache/airflow/blob/master/clients/gen/python.sh).
To update the client for new APIs do the following steps:
-```bash
- Checkout the v2-*-test branch of Airflow where you generate the client from
```bash
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 10cd103a4d1..5393e191cb6 100644
--- a/dev/breeze/src/airflow_breeze/commands/release_management_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/release_management_commands.py
@@ -3069,7 +3069,7 @@ VERSION_FILE = PYTHON_CLIENT_DIR_PATH / "version.txt"
SOURCE_API_YAML_PATH = (
AIRFLOW_ROOT_PATH /
"airflow-core/src/airflow/api_fastapi/core_api/openapi/v1-rest-api-generated.yaml"
)
-TARGET_API_YAML_PATH = PYTHON_CLIENT_DIR_PATH / "v1.yaml"
+TARGET_API_YAML_PATH = PYTHON_CLIENT_DIR_PATH / "v2.yaml"
OPENAPI_GENERATOR_CLI_VER = "7.13.0"
GENERATED_CLIENT_DIRECTORIES_TO_COPY: list[Path] = [
@@ -3078,7 +3078,6 @@ GENERATED_CLIENT_DIRECTORIES_TO_COPY: list[Path] = [
Path("test"),
]
FILES_TO_COPY_TO_CLIENT_REPO = [
- ".gitignore",
".openapi-generator-ignore",
"CHANGELOG.md",
"README.md",
@@ -3420,11 +3419,19 @@ def prepare_python_client(
)
spec_dir = python_client_repo / "spec"
spec_dir.mkdir(parents=True, exist_ok=True)
- source_spec_file = PYTHON_CLIENT_DIR_PATH / "v1.yaml"
- target_spec_file = spec_dir / "v1.yaml"
+ source_spec_file = PYTHON_CLIENT_DIR_PATH / "v2.yaml"
+ target_spec_file = spec_dir / "v2.yaml"
get_console().print(f"[info] Copying {source_spec_file} to
{target_spec_file}[/]")
shutil.copy(source_spec_file, target_spec_file)
get_console().print(f"[success] Copied {source_spec_file} to
{target_spec_file}[/]")
+
+ # Copy gitignore file
+ source_gitignore_file = PYTHON_CLIENT_DIR_PATH /
"python-client.gitignore"
+ target_gitignore_file = python_client_repo / ".gitignore"
+ get_console().print(f"[info] Copying {source_gitignore_file} to
{target_gitignore_file}[/]")
+ shutil.copy(source_gitignore_file, target_gitignore_file)
+ get_console().print(f"[success] Copied {source_gitignore_file} to
{target_gitignore_file}[/]")
+
get_console().print(
f"[success]Copied client code from {PYTHON_CLIENT_DIR_PATH} to
{python_client_repo}[/]\n"
)