Skip to content

Commit a1905fe

Browse files
Merge branch 'main' into bundles_from_config
2 parents 0118ebb + d29955a commit a1905fe

File tree

279 files changed

+2630
-649
lines changed

Some content is hidden

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

279 files changed

+2630
-649
lines changed

.github/ISSUE_TEMPLATE/airflow_bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ body:
2525
the latest release or main to see if the issue is fixed before reporting it.
2626
multiple: false
2727
options:
28-
- "2.10.3"
28+
- "2.10.4"
2929
- "main (development)"
3030
- "Other Airflow 2 version (please specify below)"
3131
validations:

.github/workflows/ci.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -744,23 +744,17 @@ jobs:
744744
steps:
745745
- name: Notify Slack
746746
id: slack
747-
uses: slackapi/slack-github-action@v1.27.0
747+
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
748748
with:
749-
channel-id: 'internal-airflow-ci-cd'
749+
method: chat.postMessage
750+
token: ${{ env.SLACK_BOT_TOKEN }}
750751
# yamllint disable rule:line-length
751752
payload: |
752-
{
753-
"text": "🚨🕒 Scheduled CI Failure Alert 🕒🚨\n\n*Details:* <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|View the failure log>",
754-
"blocks": [
755-
{
756-
"type": "section",
757-
"text": {
758-
"type": "mrkdwn",
759-
"text": "🚨🕒 Scheduled CI Failure Alert 🕒🚨\n\n*Details:* <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|View the failure log>"
760-
}
761-
}
762-
]
763-
}
753+
channel: "internal-airflow-ci-cd"
754+
text: "🚨🕒 Scheduled CI Failure Alert 🕒🚨\n\n*Details:* <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|View the failure log>"
755+
blocks:
756+
- type: "section"
757+
text:
758+
type: "mrkdwn"
759+
text: "🚨🕒 Scheduled CI Failure Alert 🕒🚨\n\n*Details:* <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|View the failure log>"
764760
# yamllint enable rule:line-length
765-
env:
766-
SLACK_BOT_TOKEN: ${{ env.SLACK_BOT_TOKEN }}

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,21 +491,21 @@ repos:
491491
files: ^docs/apache-airflow/extra-packages-ref\.rst$|^hatch_build.py
492492
pass_filenames: false
493493
entry: ./scripts/ci/pre_commit/check_extra_packages_ref.py
494-
additional_dependencies: ['rich>=12.4.4', 'hatchling==1.26.3', 'tabulate']
494+
additional_dependencies: ['rich>=12.4.4', 'hatchling==1.27.0', 'tabulate']
495495
- id: check-hatch-build-order
496496
name: Check order of dependencies in hatch_build.py
497497
language: python
498498
files: ^hatch_build.py$
499499
pass_filenames: false
500500
entry: ./scripts/ci/pre_commit/check_order_hatch_build.py
501-
additional_dependencies: ['rich>=12.4.4', 'hatchling==1.26.3']
501+
additional_dependencies: ['rich>=12.4.4', 'hatchling==1.27.0']
502502
- id: update-extras
503503
name: Update extras in documentation
504504
entry: ./scripts/ci/pre_commit/insert_extras.py
505505
language: python
506506
files: ^contributing-docs/12_airflow_dependencies_and_extras.rst$|^INSTALL$|^providers/src/airflow/providers/.*/provider\.yaml$|^Dockerfile.*
507507
pass_filenames: false
508-
additional_dependencies: ['rich>=12.4.4', 'hatchling==1.26.3']
508+
additional_dependencies: ['rich>=12.4.4', 'hatchling==1.27.0']
509509
- id: check-extras-order
510510
name: Check order of extras in Dockerfile
511511
entry: ./scripts/ci/pre_commit/check_order_dockerfile_extras.py

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ ARG AIRFLOW_UID="50000"
4545
ARG AIRFLOW_USER_HOME_DIR=/home/airflow
4646

4747
# latest released version here
48-
ARG AIRFLOW_VERSION="2.10.3"
48+
ARG AIRFLOW_VERSION="2.10.4"
4949

5050
ARG PYTHON_BASE_IMAGE="python:3.9-slim-bookworm"
5151

@@ -55,7 +55,7 @@ ARG PYTHON_BASE_IMAGE="python:3.9-slim-bookworm"
5555
# Also use `force pip` label on your PR to swap all places we use `uv` to `pip`
5656
ARG AIRFLOW_PIP_VERSION=24.3.1
5757
# ARG AIRFLOW_PIP_VERSION="git+https://github.com/pypa/pip.git@main"
58-
ARG AIRFLOW_UV_VERSION=0.5.8
58+
ARG AIRFLOW_UV_VERSION=0.5.9
5959
ARG AIRFLOW_USE_UV="false"
6060
ARG UV_HTTP_TIMEOUT="300"
6161
ARG AIRFLOW_IMAGE_REPOSITORY="https://github.com/apache/airflow"

Dockerfile.ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ RUN bash /scripts/docker/install_packaging_tools.sh; \
13811381
# Also use `force pip` label on your PR to swap all places we use `uv` to `pip`
13821382
ARG AIRFLOW_PIP_VERSION=24.3.1
13831383
# ARG AIRFLOW_PIP_VERSION="git+https://github.com/pypa/pip.git@main"
1384-
ARG AIRFLOW_UV_VERSION=0.5.8
1384+
ARG AIRFLOW_UV_VERSION=0.5.9
13851385
# TODO(potiuk): automate with upgrade check (possibly)
13861386
ARG AIRFLOW_PRE_COMMIT_VERSION="4.0.1"
13871387
ARG AIRFLOW_PRE_COMMIT_UV_VERSION="4.1.4"

PROVIDERS.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ Airflow version to the next MINOR release, when 12 months passed since the first
153153
MINOR version of Airflow.
154154

155155
For example this means that by default we upgrade the minimum version of Airflow supported by providers
156-
to 2.8.0 in the first Provider's release after 18th of December 2024. 18th of December 2023 is the date when the
157-
first ``PATCHLEVEL`` of 2.8 (2.8.0) has been released.
156+
to 2.9.0 in the first Provider's release after 8th of April 2025. 8th of April 2024 is the date when the
157+
first ``PATCHLEVEL`` of 2.9 (2.9.0) has been released.
158158

159159
When we increase the minimum Airflow version, this is not a reason to bump ``MAJOR`` version of the providers
160160
(unless there are other breaking changes in the provider). The reason for that is that people who use

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Airflow is not a streaming solution, but it is often used to process real-time d
9797

9898
Apache Airflow is tested with:
9999

100-
| | Main version (dev) | Stable version (2.10.3) |
100+
| | Main version (dev) | Stable version (2.10.4) |
101101
|------------|----------------------------|----------------------------|
102102
| Python | 3.9, 3.10, 3.11, 3.12 | 3.8, 3.9, 3.10, 3.11, 3.12 |
103103
| Platform | AMD64/ARM64(\*) | AMD64/ARM64(\*) |
@@ -175,15 +175,15 @@ them to the appropriate format and workflow that your tool requires.
175175

176176

177177
```bash
178-
pip install 'apache-airflow==2.10.3' \
179-
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.10.3/constraints-3.9.txt"
178+
pip install 'apache-airflow==2.10.4' \
179+
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.10.4/constraints-3.9.txt"
180180
```
181181

182182
2. Installing with extras (i.e., postgres, google)
183183

184184
```bash
185-
pip install 'apache-airflow[postgres,google]==2.10.3' \
186-
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.10.3/constraints-3.9.txt"
185+
pip install 'apache-airflow[postgres,google]==2.10.4' \
186+
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.10.4/constraints-3.9.txt"
187187
```
188188

189189
For information on installing provider packages, check
@@ -288,7 +288,7 @@ Apache Airflow version life cycle:
288288

289289
| Version | Current Patch/Minor | State | First Release | Limited Support | EOL/Terminated |
290290
|-----------|-----------------------|-----------|-----------------|-------------------|------------------|
291-
| 2 | 2.10.3 | Supported | Dec 17, 2020 | TBD | TBD |
291+
| 2 | 2.10.4 | Supported | Dec 17, 2020 | TBD | TBD |
292292
| 1.10 | 1.10.15 | EOL | Aug 27, 2018 | Dec 17, 2020 | June 17, 2021 |
293293
| 1.9 | 1.9.0 | EOL | Jan 03, 2018 | Aug 27, 2018 | Aug 27, 2018 |
294294
| 1.8 | 1.8.2 | EOL | Mar 19, 2017 | Jan 03, 2018 | Jan 03, 2018 |

RELEASE_NOTES.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,52 @@
2121

2222
.. towncrier release notes start
2323

24+
Airflow 2.10.4 (2024-12-16)
25+
---------------------------
26+
27+
Significant Changes
28+
^^^^^^^^^^^^^^^^^^^
29+
30+
TaskInstance ``priority_weight`` is capped in 32-bit signed integer ranges (#43611)
31+
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
32+
33+
Some database engines are limited to 32-bit integer values. As some users reported errors in
34+
weight rolled-over to negative values, we decided to cap the value to the 32-bit integer. Even
35+
if internally in python smaller or larger values to 64 bit are supported, ``priority_weight`` is
36+
capped and only storing values from -2147483648 to 2147483647.
37+
38+
Bug Fixes
39+
^^^^^^^^^
40+
41+
- Fix stats of dynamic mapped tasks after automatic retries of failed tasks (#44300)
42+
- Fix wrong display of multi-line messages in the log after filtering (#44457)
43+
- Allow "/" in metrics validator (#42934) (#44515)
44+
- Fix gantt flickering (#44488) (#44517)
45+
- Fix problem with inability to remove fields from Connection form (#40421) (#44442)
46+
- Check pool_slots on partial task import instead of execution (#39724) (#42693)
47+
- Avoid grouping task instance stats by try_number for dynamic mapped tasks (#44300) (#44319)
48+
- Re-queue task when they are stuck in queued (#43520) (#44158)
49+
- Suppress the warnings where we check for sensitive values (#44148) (#44167)
50+
- Fix get_task_instance_try_details to return appropriate schema (#43830) (#44133)
51+
- Log message source details are grouped (#43681) (#44070)
52+
- Fix duplication of Task tries in the UI (#43891) (#43950)
53+
- Add correct mime-type in OpenAPI spec (#43879) (#43901)
54+
- Disable extra links button if link is null or empty (#43844) (#43851)
55+
- Disable XCom list ordering by execution_date (#43680) (#43696)
56+
- Fix venv numpy example which needs to be 1.26 at least to be working in Python 3.12 (#43659)
57+
- Fix Try Selector in Mapped Tasks also on Index 0 (#43590) (#43591)
58+
- Prevent using ``trigger_rule="always"`` in a dynamic mapped task (#43810)
59+
- Prevent using ``trigger_rule=TriggerRule.ALWAYS`` in a task-generated mapping within bare tasks (#44751)
60+
61+
Doc Only Changes
62+
""""""""""""""""
63+
- Update XCom docs around containers/helm (#44570) (#44573)
64+
65+
Miscellaneous
66+
"""""""""""""
67+
- Raise deprecation warning when accessing inlet or outlet events through str (#43922)
68+
69+
2470
Airflow 2.10.3 (2024-11-05)
2571
---------------------------
2672

airflow/api_fastapi/common/exceptions.py

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from __future__ import annotations
1919

2020
from abc import ABC, abstractmethod
21+
from enum import Enum
2122
from typing import Generic, TypeVar
2223

2324
from fastapi import HTTPException, Request, status
@@ -38,26 +39,46 @@ def exception_handler(self, request: Request, exc: T):
3839
raise NotImplementedError
3940

4041

42+
class _DatabaseDialect(Enum):
43+
SQLITE = "sqlite"
44+
MYSQL = "mysql"
45+
POSTGRES = "postgres"
46+
47+
4148
class _UniqueConstraintErrorHandler(BaseErrorHandler[IntegrityError]):
4249
"""Exception raised when trying to insert a duplicate value in a unique column."""
4350

51+
unique_constraint_error_prefix_dict: dict[_DatabaseDialect, str] = {
52+
_DatabaseDialect.SQLITE: "UNIQUE constraint failed",
53+
_DatabaseDialect.MYSQL: "Duplicate entry",
54+
_DatabaseDialect.POSTGRES: "violates unique constraint",
55+
}
56+
4457
def __init__(self):
4558
super().__init__(IntegrityError)
46-
self.unique_constraint_error_messages = [
47-
"UNIQUE constraint failed", # SQLite
48-
"Duplicate entry", # MySQL
49-
"violates unique constraint", # PostgreSQL
50-
]
59+
self.dialect: _DatabaseDialect.value | None = None
5160

5261
def exception_handler(self, request: Request, exc: IntegrityError):
5362
"""Handle IntegrityError exception."""
54-
exc_orig_str = str(exc.orig)
55-
if any(error_msg in exc_orig_str for error_msg in self.unique_constraint_error_messages):
63+
if self._is_dialect_matched(exc):
5664
raise HTTPException(
5765
status_code=status.HTTP_409_CONFLICT,
58-
detail="Unique constraint violation",
66+
detail={
67+
"reason": "Unique constraint violation",
68+
"statement": str(exc.statement),
69+
"orig_error": str(exc.orig),
70+
},
5971
)
6072

73+
def _is_dialect_matched(self, exc: IntegrityError) -> bool:
74+
"""Check if the exception matches the unique constraint error message for any dialect."""
75+
exc_orig_str = str(exc.orig)
76+
for dialect, error_msg in self.unique_constraint_error_prefix_dict.items():
77+
if error_msg in exc_orig_str:
78+
self.dialect = dialect
79+
return True
80+
return False
81+
6182

6283
DatabaseErrorHandlers = [
6384
_UniqueConstraintErrorHandler(),

airflow/api_fastapi/core_api/datamodels/ui/structure.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class EdgeResponse(BaseModel):
2828
label: str | None = None
2929
source_id: str
3030
target_id: str
31+
is_source_asset: bool | None = None
3132

3233

3334
class NodeResponse(BaseModel):
@@ -41,6 +42,7 @@ class NodeResponse(BaseModel):
4142
setup_teardown_type: Literal["setup", "teardown"] | None = None
4243
type: Literal["join", "task", "asset-condition", "asset", "asset-alias", "dag", "sensor", "trigger"]
4344
operator: str | None = None
45+
asset_condition_type: Literal["or-gate", "and-gate"] | None = None
4446

4547

4648
class StructureDataResponse(BaseModel):

0 commit comments

Comments
 (0)