|
24 | 24 |
|
25 | 25 | .. towncrier release notes start |
26 | 26 |
|
| 27 | +Airflow 3.1.3 (2025-11-13) |
| 28 | +-------------------------- |
| 29 | + |
| 30 | +Significant Changes |
| 31 | +^^^^^^^^^^^^^^^^^^^ |
| 32 | + |
| 33 | +Fix Connection & Variable access in API server contexts (plugins, log handlers)(#56583) |
| 34 | +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
| 35 | + |
| 36 | +Previously, hooks used in API server contexts (plugins, middlewares, log handlers) would fail with an ``ImportError`` |
| 37 | +for ``SUPERVISOR_COMMS``, because ``SUPERVISOR_COMMS`` only exists in task runner child processes. |
| 38 | + |
| 39 | +This has been fixed by implementing automatic context detection with three separate secrets backend chains: |
| 40 | + |
| 41 | +**Context Detection:** |
| 42 | + |
| 43 | +1. **Client contexts** (task runner in worker): Detected via ``SUPERVISOR_COMMS`` presence |
| 44 | +2. **Server contexts** (API server, scheduler): Explicitly marked with ``_AIRFLOW_PROCESS_CONTEXT=server`` environment variable |
| 45 | +3. **Fallback contexts** (supervisor, unknown contexts): Neither marker present, uses minimal safe chain |
| 46 | + |
| 47 | +**Backend Chains:** |
| 48 | + |
| 49 | +- **Client**: ``EnvironmentVariablesBackend`` → ``ExecutionAPISecretsBackend`` (routes to Execution API via SUPERVISOR_COMMS) |
| 50 | +- **Server**: ``EnvironmentVariablesBackend`` → ``MetastoreBackend`` (direct database access) |
| 51 | +- **Fallback**: ``EnvironmentVariablesBackend`` only (+ external backends from config like AWS Secrets Manager, Vault) |
| 52 | + |
| 53 | +The fallback chain is crucial for supervisor processes (worker-side, before task runner starts) which need to access |
| 54 | +external secrets for remote logging setup but should not use ``MetastoreBackend`` (to maintain worker isolation). |
| 55 | + |
| 56 | +**Architecture Benefits:** |
| 57 | + |
| 58 | +- Workers (supervisor + task runner) never use ``MetastoreBackend``, maintaining strict isolation |
| 59 | +- External secrets backends (AWS Secrets Manager, Vault, etc.) work in all three contexts |
| 60 | +- Supervisor falls back to Execution API client for connections not found in external backends |
| 61 | +- API server and scheduler have direct database access for optimal performance |
| 62 | + |
| 63 | +**Impact:** |
| 64 | + |
| 65 | +- Hooks like ``GCSHook``, ``S3Hook`` now work correctly in log handlers and plugins |
| 66 | +- No code changes required for existing plugins or hooks |
| 67 | +- Workers remain isolated from direct database access (network-level DB blocking fully supported) |
| 68 | +- External secrets work everywhere (workers, supervisor, API server) |
| 69 | +- Robust handling of unknown contexts with safe minimal chain |
| 70 | + |
| 71 | +See: `#56120 <https://github.com/apache/airflow/issues/56120>`__, `#56583 <https://github.com/apache/airflow/issues/56583>`__, `#51816 <https://github.com/apache/airflow/issues/51816>`__ |
| 72 | + |
| 73 | +Remove insecure dag reports API endpoint that executed user code in API server (#56609) |
| 74 | +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
| 75 | + |
| 76 | + The ``/api/v2/dagReports`` endpoint has been removed because it loaded user DAG files directly in the API server process, |
| 77 | + violating Airflow's security architecture. This endpoint was not used in the UI and had no known consumers. |
| 78 | + Use the ``airflow dags report`` CLI command instead for DAG loading reports. |
| 79 | + |
| 80 | +Bug Fixes |
| 81 | +^^^^^^^^^ |
| 82 | +- Fix HITL tasks not properly validating params (#57547) (#58144) |
| 83 | +- Fix secrets being exposed in Jinja template rendering error messages (#57467) (#57962) |
| 84 | +- UI: Fix slow loading on next run assets page (#58052) (#58064) |
| 85 | +- Fix logout not working in airflow-core (#57990) (#58043) |
| 86 | +- Fix slow loading on UI [(#57820) (#57856), (#57956) (#57973), (#57957) (#57972),(#57869) (#57882), (#57868) (#57918),(#57624) (#57757)] |
| 87 | +- UI: Fix log download to include .txt file extension (#57991) (#58040) |
| 88 | +- Fix scheduler using incorrect max_active_runs value from cached DAG (#57619) (#57959) |
| 89 | +- Fix database migration failures when XCom contains NaN values (#57866) (#57893) |
| 90 | +- Fix incorrect task context in trigger rule scenarios (#57884) (#57892) |
| 91 | +- UI: Fix test connection not working (#57811) (#57852) |
| 92 | +- Fix worker ``healthcheck`` timeout not respecting worker-timeout CLI option (#57731) (#57854) |
| 93 | +- Fix provider hooks not loading when FAB provider is not installed (#57717) (#57830) |
| 94 | +- Fix slow API responses for task instances list [(#57645) (#57794), (#57646) (#57664),(#57500) (#57735), (#57549) (#57738), (#57450) (#57736),(#57647) (#57732)] |
| 95 | +- Fix task instance errors when tasks are triggered by trigger rules (#57474) (#57786) |
| 96 | +- Fix type consistency for extra field in Asset, AssetAlias, and AssetEvent (#57352) (#57728) |
| 97 | +- Fix upgrade failures when XCom contains NaN in string values (#57614) |
| 98 | + |
| 99 | +Miscellaneous |
| 100 | +^^^^^^^^^^^^^ |
| 101 | + |
| 102 | +- UI: Add resize functionality to DAG run and task instance notes (#57897) (#58068) |
| 103 | +- Add Taiwan translation for UI (#58121) |
| 104 | +- UI: Shorten German translation of Asset in navigation (#57671) (#57690) |
| 105 | +- Fix code formatting via ruff preview (#57641) (#57670) |
| 106 | +- Remove remnants from unlimited parallelism in local executor (#57579) (#57644) |
| 107 | + |
| 108 | +Doc Only Changes |
| 109 | +^^^^^^^^^^^^^^^^ |
| 110 | + |
| 111 | +- Add learning from Airflow 3 migration guide (#57989) (#58083) |
| 112 | +- Fix duplicate mention of 'DAGs' and 'tasks' in overview documentation (#57524) (#57793) |
| 113 | +- Document asset event extra storage behavior (#57727) (#57734) |
| 114 | + |
| 115 | + |
27 | 116 | Airflow 3.1.2 (2025-11-05) |
28 | 117 | -------------------------- |
29 | 118 |
|
|
0 commit comments