From f3159df40627d591f877c1b7d49e6cbc4b176cf7 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Sun, 25 Feb 2024 18:28:27 +0100 Subject: [PATCH] Bump min versions of openapi validators (#37691) The openapi validators in older versions do not work well for some moto tests which use the validators. Bumping specifically the min versions of those validators should help with better dependency resolving (wheb using uv and lowest transitive versions strategy it will downgrade the validators and will cause the tests to fail as seen in #37683. Those are only test and development dependencies and we already use the min version specified in our CI, so it should have no impact on production airflow (but should help wiht CI/dependency resolution) --- .pre-commit-config.yaml | 2 +- airflow/providers/amazon/provider.yaml | 2 ++ generated/provider_dependencies.json | 4 +++- pyproject.toml | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 65c5cf10fc2a8..1efa63e75ab1f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -365,7 +365,7 @@ repos: name: Lint OpenAPI using openapi-spec-validator entry: openapi-spec-validator --schema 3.0.0 language: python - additional_dependencies: ['openapi-spec-validator>=0.6.0'] + additional_dependencies: ['openapi-spec-validator>=0.7.1', 'openapi-schema-validator>=0.6.2'] files: ^airflow/api_connexion/openapi/ - id: lint-dockerfile name: Lint Dockerfile diff --git a/airflow/providers/amazon/provider.yaml b/airflow/providers/amazon/provider.yaml index fcbb84b5d33ad..bcde2ad278696 100644 --- a/airflow/providers/amazon/provider.yaml +++ b/airflow/providers/amazon/provider.yaml @@ -126,6 +126,8 @@ devel-dependencies: - mypy-boto3-redshift-data>=1.33.0 - mypy-boto3-s3>=1.33.0 - s3fs>=2023.10.0 + - openapi-schema-validator>=0.6.2 + - openapi-spec-validator>=0.7.1 integrations: - integration-name: Amazon Athena diff --git a/generated/provider_dependencies.json b/generated/provider_dependencies.json index 50ef20614eb4d..46c83a497ad61 100644 --- a/generated/provider_dependencies.json +++ b/generated/provider_dependencies.json @@ -46,7 +46,9 @@ "mypy-boto3-rds>=1.33.0", "mypy-boto3-redshift-data>=1.33.0", "mypy-boto3-s3>=1.33.0", - "s3fs>=2023.10.0" + "s3fs>=2023.10.0", + "openapi-schema-validator>=0.6.2", + "openapi-spec-validator>=0.7.1" ], "cross-providers-deps": [ "apache.hive", diff --git a/pyproject.toml b/pyproject.toml index 882b65475d8e0..d862c06baf6ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -565,6 +565,8 @@ amazon = [ # source: airflow/providers/amazon/provider.yaml "mypy-boto3-redshift-data>=1.33.0", "mypy-boto3-s3>=1.33.0", "s3fs>=2023.10.0", + "openapi-schema-validator>=0.6.2", + "openapi-spec-validator>=0.7.1", ] apache-beam = [ # source: airflow/providers/apache/beam/provider.yaml "apache-beam>=2.53.0;python_version != \"3.12\"",