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
15 changes: 1 addition & 14 deletions .github/workflows/basic-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,20 +301,16 @@ jobs:
--hook-stage manual upgrade-important-versions || true
if: always()
env:
UPGRADE_UV: "true"
UPGRADE_PIP: "false"
UPGRADE_PYTHON: "false"
UPGRADE_GOLANG: "false"
UPGRADE_PREK: "true"
UPGRADE_NODE_LTS: "false"
UPGRADE_HATCH: "false"
UPGRADE_PYYAML: "false"
UPGRADE_GITPYTHON: "false"
UPGRADE_RICH: "false"
UPGRADE_RUFF: "false"
UPGRADE_MPROCS: "true"
UPGRADE_MYPY: "false"
UPGRADE_PROTOC: "false"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Run automated upgrade for important versions minus uv (failing if needed)"
run: |
Expand All @@ -328,19 +324,10 @@ jobs:
if: always()
env:
UPGRADE_UV: "false"
UPGRADE_PIP: "true"
UPGRADE_PYTHON: "true"
UPGRADE_GOLANG: "true"
UPGRADE_PREK: "false"
UPGRADE_NODE_LTS: "true"
UPGRADE_HATCH: "true"
UPGRADE_PYYAML: "true"
UPGRADE_GITPYTHON: "true"
UPGRADE_RICH: "true"
UPGRADE_RUFF: "true"
UPGRADE_MYPY: "true"
UPGRADE_MPROCS: "false"
UPGRADE_PROTOC: "false"
UPGRADE_OPENAPI_GENERATOR: "false"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

test-airflow-release-commands:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3335,7 +3335,7 @@ def split_date_version_and_suffix(file_name: str, suffix: str) -> VersionedFile:
AIRFLOW_ROOT_PATH / "airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-generated.yaml"
)
TARGET_API_YAML_PATH = PYTHON_CLIENT_DIR_PATH / "v2.yaml"
OPENAPI_GENERATOR_CLI_VER = "7.13.0"
OPENAPI_GENERATOR_CLI_VER = "7.18.0"

GENERATED_CLIENT_DIRECTORIES_TO_COPY: list[Path] = [
Path("airflow_client") / "client",
Expand Down
18 changes: 18 additions & 0 deletions scripts/ci/prek/upgrade_important_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,19 @@ def get_latest_github_release_version(repo: str) -> str:
return version


def get_latest_openapi_generator_version() -> str:
if not UPGRADE_OPENAPI_GENERATOR:
return ""
if VERBOSE:
console.print("[bright_blue]Fetching latest OpenAPI generator version from GitHub")
url = "https://api.github.com/repos/OpenAPITools/openapi-generator/releases/latest"
headers = {"User-Agent": "Python requests"}
response = requests.get(url, headers=headers)
response.raise_for_status()
data = response.json()
return data["tag_name"].lstrip("v")


class Quoting(Enum):
UNQUOTED = 0
SINGLE_QUOTED = 1
Expand Down Expand Up @@ -408,6 +421,7 @@ def get_env_bool(name: str, default: bool = True) -> bool:
UPGRADE_UV: bool = get_env_bool("UPGRADE_UV")
UPGRADE_MYPY: bool = get_env_bool("UPGRADE_MYPY")
UPGRADE_PROTOC: bool = get_env_bool("UPGRADE_PROTOC")
UPGRADE_OPENAPI_GENERATOR: bool = get_env_bool("UPGRADE_OPENAPI_GENERATOR")

ALL_PYTHON_MAJOR_MINOR_VERSIONS = ["3.10", "3.11", "3.12", "3.13"]
DEFAULT_PROD_IMAGE_PYTHON_VERSION = "3.12"
Expand Down Expand Up @@ -500,6 +514,9 @@ def apply_pattern_replacements(
"mprocs": [
(r"(ARG MPROCS_VERSION=)(\"[0-9.]+\")", 'ARG MPROCS_VERSION="{version}"'),
],
"openapi_generator": [
(r"(OPENAPI_GENERATOR_CLI_VER = )(\"[0-9.]+\")", 'OPENAPI_GENERATOR_CLI_VER = "{version}"'),
],
}


Expand Down Expand Up @@ -529,6 +546,7 @@ def fetch_all_package_versions() -> dict[str, str]:
"node_lts": get_latest_lts_node_version() if UPGRADE_NODE_LTS else "",
"protoc": get_latest_image_version("rvolosatovs/protoc") if UPGRADE_PROTOC else "",
"mprocs": get_latest_github_release_version("pvolok/mprocs") if UPGRADE_MPROCS else "",
"openapi_generator": get_latest_openapi_generator_version() if UPGRADE_OPENAPI_GENERATOR else "",
}


Expand Down
Loading