Skip to content

Commit 0eebf9f

Browse files
authored
Merge branch 'main' into mask-issue
2 parents 76e16c1 + b44a889 commit 0eebf9f

File tree

205 files changed

+7722
-3492
lines changed

Some content is hidden

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

205 files changed

+7722
-3492
lines changed

.asf.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ github:
123123
# https://github.com/apache/infrastructure-asfyaml/blob/main/README.md#assigning-the-github-triage-role-to-external-collaborators
124124
- aritra24
125125
- dirrao
126+
- omkar-foss
126127
- rawwar
127128
- nathadfield
128129
- sunank200
@@ -133,3 +134,7 @@ github:
133134

134135
notifications:
135136
137+
138+
139+
pullrequests: [email protected]
140+
discussions: [email protected]

.github/SECURITY.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,11 @@ do not apply to Airflow, or have a different severity than some generic scoring
9999

100100
The Airflow Security Team will get back to you after assessing the report. You will usually get
101101
confirmation that the issue is being worked (or that we quickly assessed it as invalid) within several
102-
business days. Note that this is an Open-Source projects and members of the security team are volunteers
103-
so please make sure to be patient. If you do not get a response within a week or so, please send a
104-
kind reminder to the security team. We will usually let you know the CVE number that will be assigned
105-
to the issue and the severity of the issue as well as release the issue is scheduled to be fixed
102+
business days. Note that this is an Open-Source projects and members of the security team are volunteers,
103+
so please make sure to be patient. If you do not get a response within a week, please send a kind reminder
104+
to the security team about a lack of response; however, reminders should only be for the initial response
105+
and not for updates on the assessment or remediation. We will usually let you know the CVE number that will
106+
be assigned to the issue and the severity of the issue as well as release the issue is scheduled to be fixed
106107
after we assess the issue (which might take longer or shorter time depending on the issue complexity and
107108
potential impact, severity, whether we want to address a whole class issues in a single fix and a number
108109
of other factors). You should subscribe and monitor the `[email protected]` mailing

.github/workflows/basic-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@ jobs:
359359
--hook-stage manual
360360
update-build-dependencies
361361
if: always()
362+
env:
363+
SKIP_TROVE_CLASSIFIERS_ONLY: "true"
362364
- name: "Run automated upgrade for chart dependencies"
363365
run: >
364366
pre-commit run

.github/workflows/ci.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
ci-image-build: ${{ steps.selective-checks.outputs.ci-image-build }}
100100
prod-image-build: ${{ steps.selective-checks.outputs.prod-image-build }}
101101
docs-build: ${{ steps.selective-checks.outputs.docs-build }}
102-
mypy-folders: ${{ steps.selective-checks.outputs.mypy-folders }}
102+
mypy-checks: ${{ steps.selective-checks.outputs.mypy-checks }}
103103
needs-mypy: ${{ steps.selective-checks.outputs.needs-mypy }}
104104
needs-helm-tests: ${{ steps.selective-checks.outputs.needs-helm-tests }}
105105
needs-api-tests: ${{ steps.selective-checks.outputs.needs-api-tests }}
@@ -298,7 +298,7 @@ jobs:
298298
runs-on-as-json-docs-build: ${{ needs.build-info.outputs.runs-on-as-json-docs-build }}
299299
image-tag: ${{ needs.build-info.outputs.image-tag }}
300300
needs-mypy: ${{ needs.build-info.outputs.needs-mypy }}
301-
mypy-folders: ${{ needs.build-info.outputs.mypy-folders }}
301+
mypy-checks: ${{ needs.build-info.outputs.mypy-checks }}
302302
python-versions-list-as-string: ${{ needs.build-info.outputs.python-versions-list-as-string }}
303303
branch: ${{ needs.build-info.outputs.default-branch }}
304304
canary-run: ${{ needs.build-info.outputs.canary-run }}
@@ -644,6 +644,24 @@ jobs:
644644
( needs.build-info.outputs.run-kubernetes-tests == 'true' ||
645645
needs.build-info.outputs.needs-helm-tests == 'true')
646646
647+
tests-task-sdk:
648+
name: "Task SDK tests"
649+
uses: ./.github/workflows/task-sdk-tests.yml
650+
needs: [build-info, wait-for-ci-images]
651+
permissions:
652+
contents: read
653+
packages: read
654+
secrets: inherit
655+
with:
656+
runs-on-as-json-default: ${{ needs.build-info.outputs.runs-on-as-json-default }}
657+
image-tag: ${{ needs.build-info.outputs.image-tag }}
658+
default-python-version: ${{ needs.build-info.outputs.default-python-version }}
659+
python-versions: ${{ needs.build-info.outputs.python-versions }}
660+
run-task-sdk-tests: ${{ needs.build-info.outputs.run-task-sdk-tests }}
661+
if: >
662+
( needs.build-info.outputs.run-task-sdk-tests == 'true' ||
663+
needs.build-info.outputs.run-tests == 'true')
664+
647665
finalize-tests:
648666
name: Finalize tests
649667
permissions:

.github/workflows/static-checks-mypy-docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ on: # yamllint disable-line rule:truthy
3636
description: "Whether to run mypy checks (true/false)"
3737
required: true
3838
type: string
39-
mypy-folders:
39+
mypy-checks:
4040
description: "List of folders to run mypy checks on"
4141
required: false
4242
type: string
@@ -148,7 +148,7 @@ jobs:
148148
strategy:
149149
fail-fast: false
150150
matrix:
151-
mypy-folder: ${{ fromJSON(inputs.mypy-folders) }}
151+
mypy-check: ${{ fromJSON(inputs.mypy-checks) }}
152152
env:
153153
PYTHON_MAJOR_MINOR_VERSION: "${{inputs.default-python-version}}"
154154
IMAGE_TAG: "${{ inputs.image-tag }}"
@@ -166,10 +166,10 @@ jobs:
166166
- name: "Prepare breeze & CI image: ${{ inputs.default-python-version }}:${{ inputs.image-tag }}"
167167
uses: ./.github/actions/prepare_breeze_and_image
168168
id: breeze
169-
- name: "MyPy checks for ${{ matrix.mypy-folder }}"
169+
- name: "MyPy checks for ${{ matrix.mypy-check }}"
170170
run: |
171171
pip install pre-commit
172-
pre-commit run --color always --verbose --hook-stage manual mypy-${{matrix.mypy-folder}} --all-files
172+
pre-commit run --color always --verbose --hook-stage manual ${{matrix.mypy-check}} --all-files
173173
env:
174174
VERBOSE: "false"
175175
COLUMNS: "250"

.github/workflows/task-sdk-tests.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ on: # yamllint disable-line rule:truthy
2828
description: "Tag to set for the image"
2929
required: true
3030
type: string
31-
canary-run:
32-
description: "Whether this is a canary run"
33-
required: true
34-
type: string
3531
default-python-version:
3632
description: "Which version of python should be used by default"
3733
required: true
@@ -40,6 +36,10 @@ on: # yamllint disable-line rule:truthy
4036
description: "JSON-formatted array of Python versions to build images from"
4137
required: true
4238
type: string
39+
run-task-sdk-tests:
40+
description: "Whether to run Task SDK tests or not (true/false)"
41+
required: true
42+
type: string
4343
jobs:
4444
task-sdk-tests:
4545
timeout-minutes: 80
@@ -58,7 +58,6 @@ jobs:
5858
PYTHON_MAJOR_MINOR_VERSION: "${{ inputs.default-python-version }}"
5959
VERBOSE: "true"
6060
CLEAN_AIRFLOW_INSTALLATION: "${{ inputs.canary-run }}"
61-
if: inputs.run-task-sdk-tests == 'true'
6261
steps:
6362
- name: "Cleanup repo"
6463
shell: bash
@@ -81,11 +80,6 @@ jobs:
8180
pipx uninstall twine || true
8281
pipx install twine && twine check dist/*.whl
8382
- name: >
84-
Run provider unit tests on
85-
Airflow Task SDK:Python ${{ matrix.python-version }}
86-
if: matrix.run-tests == 'true'
83+
Run unit tests for Airflow Task SDK:Python ${{ matrix.python-version }}
8784
run: >
88-
breeze testing tests --run-in-parallel
89-
--parallel-test-types TaskSDK
90-
--use-packages-from-dist
91-
--package-format wheel
85+
breeze testing task-sdk-tests --python "${{ matrix.python-version }}"

.pre-commit-config.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ repos:
193193
files: ^.pre-commit-config.yaml$|^scripts/ci/pre_commit/update_build_dependencies.py$
194194
pass_filenames: false
195195
require_serial: true
196+
additional_dependencies: ['rich>=12.4.4']
196197
- id: update-installers
197198
name: Update installers to latest (manual)
198199
entry: ./scripts/ci/pre_commit/update_installers.py
@@ -1291,6 +1292,7 @@ repos:
12911292
^.*/.*_vendor/ |
12921293
^airflow/migrations |
12931294
^providers/ |
1295+
^task_sdk/ |
12941296
^dev |
12951297
^scripts |
12961298
^docs |
@@ -1343,6 +1345,23 @@ repos:
13431345
files: ^.*\.py$
13441346
require_serial: true
13451347
additional_dependencies: ['rich>=12.4.4']
1348+
- id: mypy-task-sdk
1349+
name: Run mypy for Task SDK
1350+
language: python
1351+
entry: ./scripts/ci/pre_commit/mypy.py --namespace-packages
1352+
files: ^task_sdk/src/airflow/sdk/.*\.py$|^task_sdk/tests//.*\.py$
1353+
exclude: ^.*/.*_vendor/
1354+
require_serial: true
1355+
additional_dependencies: ['rich>=12.4.4']
1356+
- id: mypy-task-sdk
1357+
stages: ['manual']
1358+
name: Run mypy for Task SDK (manual)
1359+
language: python
1360+
entry: ./scripts/ci/pre_commit/mypy_folder.py task_sdk/src/airflow/sdk
1361+
pass_filenames: false
1362+
files: ^.*\.py$
1363+
require_serial: true
1364+
additional_dependencies: ['rich>=12.4.4']
13461365
- id: check-provider-yaml-valid
13471366
name: Validate provider.yaml files
13481367
entry: ./scripts/ci/pre_commit/check_provider_yaml_files.py

Dockerfile.ci

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,7 @@ RUN bash /scripts/docker/install_packaging_tools.sh; \
13851385
COPY pyproject.toml ${AIRFLOW_SOURCES}/pyproject.toml
13861386
COPY providers/pyproject.toml ${AIRFLOW_SOURCES}/providers/pyproject.toml
13871387
COPY task_sdk/pyproject.toml ${AIRFLOW_SOURCES}/task_sdk/pyproject.toml
1388+
COPY task_sdk/README.md ${AIRFLOW_SOURCES}/task_sdk/README.md
13881389
COPY airflow/__init__.py ${AIRFLOW_SOURCES}/airflow/
13891390
COPY tests_common/ ${AIRFLOW_SOURCES}/tests_common/
13901391
COPY generated/* ${AIRFLOW_SOURCES}/generated/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ Those are - in the order of most common ways people install Airflow:
219219
- [PyPI releases](https://pypi.org/project/apache-airflow/) to install Airflow using standard `pip` tool
220220
- [Docker Images](https://hub.docker.com/r/apache/airflow) to install airflow via
221221
`docker` tool, use them in Kubernetes, Helm Charts, `docker-compose`, `docker swarm`, etc. You can
222-
read more about using, customising, and extending the images in the
222+
read more about using, customizing, and extending the images in the
223223
[Latest docs](https://airflow.apache.org/docs/docker-stack/index.html), and
224224
learn details on the internals in the [images](https://airflow.apache.org/docs/docker-stack/index.html) document.
225225
- [Tags in GitHub](https://github.com/apache/airflow/tags) to retrieve the git project sources that

airflow/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
# KIND, either express or implied. See the License for the
1616
# specific language governing permissions and limitations
1717
# under the License.
18-
from __future__ import annotations
18+
19+
# We do not use "from __future__ import annotations" here because it is not supported
20+
# by Pycharm when we want to make sure all imports in airflow work from namespace packages
21+
# Adding it automatically is excluded in pyproject.toml via I002 ruff rule exclusion
1922

2023
# Make `airflow` a namespace package, supporting installing
2124
# airflow.providers.* in different locations (i.e. one in site, and one in user

0 commit comments

Comments
 (0)