Content-Length: 415739 | pFad | http://github.com/apache/airflow/commit/a531da4828b69e02a1e073cae8d60ed31da45303

B6 Fix Python client release steps (#50770) · apache/airflow@a531da4 · GitHub
Skip to content

Commit a531da4

Browse files
authored
Fix Python client release steps (#50770)
Updated docs & gitignore generation.
1 parent cb21363 commit a531da4

File tree

5 files changed

+20
-6
lines changed

5 files changed

+20
-6
lines changed

clients/python/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/test
55
/tmp
66
/v1.yaml
7+
/v2.yaml
78
/.coverage
89
/apache_airflow_client.egg-info/
910
/.idea

clients/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ classifiers = [
5252
dependencies = [
5353
"pydantic >= 2.11.0",
5454
"python-dateutil",
55-
"urllib3 >= 1.25.3",
55+
"urllib3 >= 2.1.0",
5656
]
5757

5858
[project.urls]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/dist
2+
/tmp
3+
/v1.yaml
4+
/v2.yaml
5+
/.coverage
6+
/apache_airflow_client.egg-info/
7+
/.idea

dev/README_RELEASE_PYTHON_CLIENT.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ The client versioning is independent of the Airflow versioning.
4848
The Python client is generated using Airflow's [openapi spec](https://github.com/apache/airflow/blob/master/clients/gen/python.sh).
4949
To update the client for new APIs do the following steps:
5050

51-
```bash
5251
- Checkout the v2-*-test branch of Airflow where you generate the client from
5352

5453
```bash

dev/breeze/src/airflow_breeze/commands/release_management_commands.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3081,7 +3081,7 @@ def split_version_and_suffix(file_name: str, suffix: str) -> VersionedFile:
30813081
SOURCE_API_YAML_PATH = (
30823082
AIRFLOW_ROOT_PATH / "airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml"
30833083
)
3084-
TARGET_API_YAML_PATH = PYTHON_CLIENT_DIR_PATH / "v1.yaml"
3084+
TARGET_API_YAML_PATH = PYTHON_CLIENT_DIR_PATH / "v2.yaml"
30853085
OPENAPI_GENERATOR_CLI_VER = "7.13.0"
30863086

30873087
GENERATED_CLIENT_DIRECTORIES_TO_COPY: list[Path] = [
@@ -3090,7 +3090,6 @@ def split_version_and_suffix(file_name: str, suffix: str) -> VersionedFile:
30903090
Path("test"),
30913091
]
30923092
FILES_TO_COPY_TO_CLIENT_REPO = [
3093-
".gitignore",
30943093
".openapi-generator-ignore",
30953094
"CHANGELOG.md",
30963095
"README.md",
@@ -3432,11 +3431,19 @@ def visit_FunctionDef(self, node: ast.FunctionDef) -> ast.FunctionDef:
34323431
)
34333432
spec_dir = python_client_repo / "spec"
34343433
spec_dir.mkdir(parents=True, exist_ok=True)
3435-
source_spec_file = PYTHON_CLIENT_DIR_PATH / "v1.yaml"
3436-
target_spec_file = spec_dir / "v1.yaml"
3434+
source_spec_file = PYTHON_CLIENT_DIR_PATH / "v2.yaml"
3435+
target_spec_file = spec_dir / "v2.yaml"
34373436
get_console().print(f"[info] Copying {source_spec_file} to {target_spec_file}[/]")
34383437
shutil.copy(source_spec_file, target_spec_file)
34393438
get_console().print(f"[success] Copied {source_spec_file} to {target_spec_file}[/]")
3439+
3440+
# Copy gitignore file
3441+
source_gitignore_file = PYTHON_CLIENT_DIR_PATH / "python-client.gitignore"
3442+
target_gitignore_file = python_client_repo / ".gitignore"
3443+
get_console().print(f"[info] Copying {source_gitignore_file} to {target_gitignore_file}[/]")
3444+
shutil.copy(source_gitignore_file, target_gitignore_file)
3445+
get_console().print(f"[success] Copied {source_gitignore_file} to {target_gitignore_file}[/]")
3446+
34403447
get_console().print(
34413448
f"[success]Copied client code from {PYTHON_CLIENT_DIR_PATH} to {python_client_repo}[/]\n"
34423449
)

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/apache/airflow/commit/a531da4828b69e02a1e073cae8d60ed31da45303

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy