Skip to content

Commit 3957680

Browse files
committed
Run fab provider tests in v2-11-test
Since we are releasing fab provider from v2-11-test we should also run fab provider tests there. This chang consists of: * migrating to FAB 4.5.3 (includes scrypt algorithm fix) * monkeypatching flask-session so that it works well with new flask-sqlalchey * caching initial$aization of Session class from flask-session and AirflowDatabaseSessionInterface so that DB connection is not created multiple times during tests * fixing imports from tests
1 parent 1d9cf9e commit 3957680

File tree

71 files changed

+503
-609
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+503
-609
lines changed

.github/workflows/ci-image-build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ jobs:
116116
PYTHON_MAJOR_MINOR_VERSION: ${{ matrix.python-version }}
117117
DEFAULT_BRANCH: ${{ inputs.branch }}
118118
DEFAULT_CONSTRAINTS_BRANCH: ${{ inputs.constraints-branch }}
119-
VERSION_SUFFIX_FOR_PYPI: "dev0"
120119
GITHUB_REPOSITORY: ${{ github.repository }}
121120
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
122121
GITHUB_USERNAME: ${{ github.actor }}

.github/workflows/ci.yml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -466,26 +466,26 @@ jobs:
466466
debug-resources: ${{ needs.build-info.outputs.debug-resources }}
467467
use-uv: ${{ needs.build-info.outputs.use-uv }}
468468

469-
tests-integration-system:
470-
name: Integration and System Tests
471-
needs: [build-info, build-ci-images]
472-
uses: ./.github/workflows/integration-system-tests.yml
473-
permissions:
474-
contents: read
475-
packages: read
476-
with:
477-
runs-on-as-json-public: ${{ needs.build-info.outputs.runs-on-as-json-public }}
478-
testable-core-integrations: ${{ needs.build-info.outputs.testable-core-integrations }}
479-
testable-providers-integrations: ${{ needs.build-info.outputs.testable-providers-integrations }}
480-
run-system-tests: ${{ needs.build-info.outputs.run-tests }}
481-
default-python-version: ${{ needs.build-info.outputs.default-python-version }}
482-
default-postgres-version: ${{ needs.build-info.outputs.default-postgres-version }}
483-
default-mysql-version: ${{ needs.build-info.outputs.default-mysql-version }}
484-
skip-providers-tests: ${{ needs.build-info.outputs.skip-providers-tests }}
485-
run-coverage: ${{ needs.build-info.outputs.run-coverage }}
486-
debug-resources: ${{ needs.build-info.outputs.debug-resources }}
487-
use-uv: ${{ needs.build-info.outputs.use-uv }}
488-
if: needs.build-info.outputs.run-tests == 'true'
469+
# tests-integration-system:
470+
# name: Integration and System Tests
471+
# needs: [build-info, build-ci-images]
472+
# uses: ./.github/workflows/integration-system-tests.yml
473+
# permissions:
474+
# contents: read
475+
# packages: read
476+
# with:
477+
# runs-on-as-json-public: ${{ needs.build-info.outputs.runs-on-as-json-public }}
478+
# testable-core-integrations: ${{ needs.build-info.outputs.testable-core-integrations }}
479+
# testable-providers-integrations: ${{ needs.build-info.outputs.testable-providers-integrations }}
480+
# run-system-tests: ${{ needs.build-info.outputs.run-tests }}
481+
# default-python-version: ${{ needs.build-info.outputs.default-python-version }}
482+
# default-postgres-version: ${{ needs.build-info.outputs.default-postgres-version }}
483+
# default-mysql-version: ${{ needs.build-info.outputs.default-mysql-version }}
484+
# skip-providers-tests: ${{ needs.build-info.outputs.skip-providers-tests }}
485+
# run-coverage: ${{ needs.build-info.outputs.run-coverage }}
486+
# debug-resources: ${{ needs.build-info.outputs.debug-resources }}
487+
# use-uv: ${{ needs.build-info.outputs.use-uv }}
488+
# if: needs.build-info.outputs.run-tests == 'true'
489489

490490
tests-with-lowest-direct-resolution:
491491
name: "Lowest direct dependency providers tests"
@@ -593,7 +593,6 @@ jobs:
593593
- tests-mysql
594594
- tests-postgres
595595
- tests-non-db
596-
- tests-integration-system
597596
- build-prod-images
598597
uses: ./.github/workflows/finalize-tests.yml
599598
with:

.github/workflows/helm-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
- name: "Helm release tarball"
118118
run: >
119119
breeze release-management prepare-helm-chart-tarball --ignore-version-check --override-tag
120-
--skip-tag-signing --version 0.0.0 --version-suffix dev0
120+
--skip-tag-signing --version 0.0.0
121121
- name: Generate GPG key for signing
122122
# Sometimes the key will be already added to the keyring, so we ignore the error
123123
run: gpg --batch --passphrase '' --quick-gen-key dev@airflow.apache.org default default || true

.github/workflows/prod-image-build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ jobs:
126126
if: inputs.prod-image-build == 'true'
127127
env:
128128
PYTHON_MAJOR_MINOR_VERSION: "${{ inputs.default-python-version }}"
129-
VERSION_SUFFIX_FOR_PYPI: ${{ inputs.branch == 'main' && 'dev0' || '' }}
130129
steps:
131130
- name: "Cleanup repo"
132131
shell: bash
@@ -197,7 +196,6 @@ jobs:
197196
PYTHON_MAJOR_MINOR_VERSION: "${{ matrix.python-version }}"
198197
DEFAULT_BRANCH: ${{ inputs.branch }}
199198
DEFAULT_CONSTRAINTS_BRANCH: ${{ inputs.constraints-branch }}
200-
VERSION_SUFFIX_FOR_PYPI: ${{ inputs.branch == 'main' && 'dev0' || '' }}
201199
INCLUDE_NOT_READY_PROVIDERS: "true"
202200
# You can override CONSTRAINTS_GITHUB_REPOSITORY by setting secret in your repo but by default the
203201
# Airflow one is going to be used

.github/workflows/push-image-cache.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ jobs:
116116
PYTHON_MAJOR_MINOR_VERSION: "${{ matrix.python }}"
117117
UPGRADE_TO_NEWER_DEPENDENCIES: "false"
118118
VERBOSE: "true"
119-
VERSION_SUFFIX_FOR_PYPI: "dev0"
120119
steps:
121120
- name: "Cleanup repo"
122121
shell: bash
@@ -191,7 +190,6 @@ jobs:
191190
PYTHON_MAJOR_MINOR_VERSION: "${{ matrix.python }}"
192191
UPGRADE_TO_NEWER_DEPENDENCIES: "false"
193192
VERBOSE: "true"
194-
VERSION_SUFFIX_FOR_PYPI: "dev0"
195193
if: inputs.include-prod-images == 'true'
196194
steps:
197195
- name: "Cleanup repo"

.github/workflows/release_dockerhub_image.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,13 @@ jobs:
145145
- name: "Create airflow_cache builder"
146146
run: docker buildx create --name airflow_cache
147147
- name: "Prepare chicken-eggs provider packages"
148-
# In case of provider packages which use latest dev0 version of providers, we should prepare them
149-
# from the source code, not from the PyPI because they have apache-airflow>=X.Y.Z dependency
150-
# And when we prepare them from sources they will have apache-airflow>=X.Y.Z.dev0
151148
shell: bash
152149
env:
153150
CHICKEN_EGG_PROVIDERS: ${{ needs.build-info.outputs.chicken-egg-providers }}
154151
run: >
155152
breeze release-management prepare-provider-packages
156153
--package-format wheel
157-
--version-suffix-for-pypi dev0 ${CHICKEN_EGG_PROVIDERS}
154+
${CHICKEN_EGG_PROVIDERS}
158155
if: needs.build-info.outputs.chicken-egg-providers != ''
159156
- name: "Copy dist packages to docker-context files"
160157
shell: bash

.github/workflows/test-provider-packages.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ jobs:
9999
- name: "Prepare provider documentation"
100100
run: >
101101
breeze release-management prepare-provider-documentation --include-not-ready-providers
102-
--non-interactive
102+
--non-interactive fab
103103
if: matrix.package-format == 'wheel'
104104
- name: "Prepare provider packages: ${{ matrix.package-format }}"
105105
run: >
106106
breeze release-management prepare-provider-packages --include-not-ready-providers
107-
--version-suffix-for-pypi dev0 --package-format ${{ matrix.package-format }}
107+
--package-format ${{ matrix.package-format }} fab
108108
- name: "Prepare airflow package: ${{ matrix.package-format }}"
109109
run: >
110-
breeze release-management prepare-airflow-package --version-suffix-for-pypi dev0
110+
breeze release-management prepare-airflow-package
111111
--package-format ${{ matrix.package-format }}
112112
- name: "Verify ${{ matrix.package-format }} packages with twine"
113113
run: |
@@ -167,7 +167,6 @@ jobs:
167167
GITHUB_USERNAME: ${{ github.actor }}
168168
INCLUDE_NOT_READY_PROVIDERS: "true"
169169
PYTHON_MAJOR_MINOR_VERSION: "${{ matrix.python-version }}"
170-
VERSION_SUFFIX_FOR_PYPI: "dev0"
171170
VERBOSE: "true"
172171
CLEAN_AIRFLOW_INSTALLATION: "${{ inputs.canary-run }}"
173172
if: inputs.skip-providers-tests != 'true'

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ repos:
11111111
stages: ['manual']
11121112
name: Run mypy for providers (manual)
11131113
language: python
1114-
entry: ./scripts/ci/pre_commit/mypy_folder.py providers/src/airflow/providers
1114+
entry: ./scripts/ci/pre_commit/mypy_folder.py airflow/providers/fab
11151115
pass_filenames: false
11161116
files: ^.*\.py$
11171117
require_serial: true

Dockerfile.ci

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,8 @@ function check_force_lowest_dependencies() {
10411041
EXTRA="[devel]"
10421042
if [[ ${TEST_TYPE=} =~ Providers\[.*\] ]]; then
10431043
# shellcheck disable=SC2001
1044-
EXTRA=$(echo "[${TEST_TYPE},devel]" | sed 's/Providers\[\(.*\)\]/\1/')
1044+
EXTRA=$(echo "[${TEST_TYPE}]" | sed 's/Providers\[\(.*\)\]/\1/')
1045+
EXTRA="${EXTRA},devel"
10451046
echo
10461047
echo "${COLOR_BLUE}Forcing dependencies to lowest versions for provider: ${EXTRA}${COLOR_RESET}"
10471048
echo

airflow/api_connexion/security.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,14 @@
4545

4646
def check_authentication() -> None:
4747
"""Check that the request has valid authorization information."""
48-
for auth in get_airflow_app().api_auth:
48+
airflow_app = get_airflow_app()
49+
for auth in airflow_app.api_auth:
4950
response = auth.requires_authentication(Response)()
5051
if response.status_code == 200:
5152
return
5253

5354
# Even if the current_user is anonymous, the AUTH_ROLE_PUBLIC might still have permission.
54-
appbuilder = get_airflow_app().appbuilder
55+
appbuilder = airflow_app.appbuilder
5556
if appbuilder.get_app.config.get("AUTH_ROLE_PUBLIC", None):
5657
return
5758

0 commit comments

Comments
 (0)