Skip to content
Back to skills

Airflow Knowledge Patch

ASecurity

Apache Airflow

  • 25 stars
  • 0 votes
  • 0 copies
  • 10 views
  • Added September 5, 2026
developmentpythonrustgobashsqlfastapitestingdebuggingapidatabase

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 9 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill airflow-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Airflow Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Airflow Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-airflow-knowledge-patch-nevaberry-plugins/badge)](https://www.skillsdirectory.com/skills/nevaberry-airflow-knowledge-patch-nevaberry-plugins)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: airflow-knowledge-patch
description: Apache Airflow
version: "3.4.0"
license: MIT
metadata:
  author: Nevaberry
---


# Apache Airflow compatibility guidance

Use this skill when migrating Airflow, authoring DAGs and tasks, updating
extensions, or maintaining API clients and deployments. Load the reference
that matches the work; retain the version-specific qualifications in its guidance.

| Reference | Topics |
| --- | --- |
| [APIs, CLI, and UI](references/api-cli-ui.md) | REST requests, backfills, clearing, testing, administration, and views |
| [Assets, partitions, and state](references/assets-partitions.md) | Asset schedules, event history, partition mappings, and persistent state |
| [Dag and task authoring](references/dag-task-authoring.md) | Timetables, context, TaskGroups, retries, human input, deadlines, and callbacks |
| [Execution and deployment](references/execution-deployment.md) | Processes, executors, bundles, triggers, images, mail, and teams |
| [Extensions, serialization, and XCom](references/extensions-serialization.md) | Public interfaces, plugins, listeners, custom backends, and serialization |
| [Migration and configuration](references/migration-configuration.md) | Upgrade preparation, configuration moves, dependencies, and database migrations |
| [Observability and security](references/observability-security.md) | Authentication, permissions, TLS, secrets, audit logs, logging, metrics, and traces |

## Breaking changes and deprecations

### Prepare the upgrade

Upgrade to Airflow 2.7 or later before migrating to 3. Run
`airflow dags reserialize` on the 2.x instance and resolve any DAG-processing
errors before upgrading.

Use Ruff 0.13.1 or newer for the upgrade guide's rules. `AIR301` and `AIR302`
flag breaking changes, `AIR311` and `AIR312` flag recommended updates, and
`F401` catches unused legacy imports left behind by a rewrite.

```bash
ruff check dags/ --select AIR301,AIR302
ruff check dags/ --select AIR311,AIR312,F401
```

Ruff marks some Airflow import rewrites as unsafe when the imported name stays
the same, such as moving `BaseSensorOperator` to the Task SDK. Enable unsafe
fixes to apply those rewrites and review the resulting diff.

```bash
ruff check dags/ --select AIR301 --fix --unsafe-fixes
```

### Migrate public imports and metadata access

Install `apache-airflow-providers-standard` on the 2.x deployment to migrate
imports for operators and sensors such as `BashOperator`, `ExternalTaskSensor`,
and `FileSensor` before upgrading core.

Move imports of `BaseNotifier`, `BaseOperatorLink`, and `ParamsDict` to
`airflow.sdk`, and move imports under `airflow.io` to `airflow.sdk.io`.
Replace `from airflow import Dataset` with `from airflow.sdk import Asset`.

Replace task-side ORM queries with methods such as `get_dr_count`,
`get_dagrun_state`, or `get_task_states` on the runtime task instance.
`airflow.sdk.types.DagRunProtocol` describes the run object available through
the task context.

Worker task code is isolated from Airflow's metadata database sessions and
models. DAG author code running in the DAG processor or triggerer can still
have direct database access, so account for both processes when deciding
which code to trust with metadata access.

### Update configuration, processes, and API clients

Run `airflow config update` to check the configuration for upgrade changes.
Use `--fix` to apply the updates. Airflow no longer rewrites values that match
deprecated defaults. Run `airflow config lint` to find obsolete configuration
keys and set the values your deployment needs explicitly.

When launching Airflow components individually, start `airflow dag-processor`
as its own process even in local development. Use `airflow api-server` in
place of `airflow webserver`. Move settings under `webserver` to `apiServer`
in the Helm chart values and check the nested keys for renames and removals.

Migrate callers of `/api/v1` to `/api/v2`. For metadata operations outside the
task context, install `apache-airflow-client` to call the REST API from Python
and obtain an access token from `/auth/token`.

REST API v2 reports invalid inputs with HTTP 422. Update callers that handle
validation failures as HTTP 400 or send `execution_date` in place of `logical_date`.

### Preserve scheduling and context semantics

Airflow 3.0 defaults an omitted schedule to `None`, so a DAG that relied on
the old implicit `@once` needs `schedule="@once"` to run once automatically.

Bare cron strings now use `CronTriggerTimetable`, which changes data intervals
and can shift logical-date templates such as `ds` and `ts`. Set
`create_cron_data_intervals=True` before upgrading to keep
`CronDataIntervalTimetable` for those schedules, since switching back after
Airflow 3 runs exist can skip one scheduled run due to a logical-date collision.

Asset-triggered runs and REST-triggered runs that omit `logical_date` can have
no logical date or data interval. Read `dag_run.logical_date` (which can be
`None`) and use `context.get("data_interval_start")` or
`context.get("data_interval_end")` when the interval is optional. Airflow can
create multiple runs with `logical_date=None`.

Omitting `task_ids` now reads only from the current task. Supply the producer's
ID when pulling a value from a different task.

```python
value = ti.xcom_pull(task_ids="upstream_task", key="shared_state")
```

### Check state and backend compatibility

Loop DAGs fail to start with an XCom backend that still writes through
`serialize_value`, including `XComObjectStorageBackend` from
`apache-airflow-providers-common-io` 1.10.1 or earlier. Move custom backends to
`store_value` and `load_value` with paths from `XComCoordinate.build_path`, and
include `scope.region_id` in custom task state backend keys to handle mapped
tasks and regenerated iterations.

Clearing individual task instances now deletes their stored state by default,
so the next attempt starts without a saved checkpoint. Set `keep_task_state=True`
or select **Keep task state** in the clear dialog to retain it, as retries and
whole-DAG-run clears still do.

Workers running Task SDK 1.1.x or earlier cannot resume deferred tasks with
custom class instances in `next_kwargs`. Upgrade those workers to 1.2.0 or later,
or pass only built-in values, assets, and asset aliases through defer kwargs
and trigger events.

### Review deployment and authentication changes

Airflow 3.4, the Task SDK, and `airflowctl` require Python 3.11 or later.
Each API server worker has separate sync and async pools, sized by the same
`[database] sql_alchemy_pool_size` and `sql_alchemy_max_overflow` settings.
Budget for up to 30 connections per worker with the defaults, including when
`airflow api-server --apps` serves only `core` or only `execution`.

Core API authentication checks bearer tokens, OAuth2 tokens, and the `_token`
session cookie in that order. An invalid or expired explicit credential causes
HTTP 401 or 403 even when the session cookie is valid.

FastAPI apps registered by plugins must enforce authentication and authorization
on the routes they want to protect.

## Frequently used features

### Asset scheduling and partitions

Single-asset and asset OR schedules now create one run per event, including
with `AssetOrTimeSchedule` and `PartitionedAssetTimetable`, while already
serialized timetables retain batching until reparsed. To preserve batching
after reparse, set `batch_asset_events=True` on the timetable or enable
`[scheduler] batch_asset_events`, and leave batching enabled for asset AND,
asset lists, and `RollupMapper`, which reject `batch_asset_events=False`.

Use `AssetAndTimeSchedule` when a schedule must combine an asset condition
with a time condition. Use `RollupMapper` for many-to-one mapping,
`FanOutMapper` for one-to-many mapping, and `FixedKeyMapper` with `SegmentWindow`
for categorical rollups. Set `wait_policy` to `WaitForAll` to wait for every
upstream partition in a window or use `wait_policy=MinimumCount(2)` to run
after two arrive.

### Persistent state and TaskGroup loops

Use the Task SDK's `task_state_store` and `asset_state_store` to persist JSON
values across retries and runs. Both stores accept a fallback via
`get(..., default=...)`.

Call `.loop()` on a decorated TaskGroup to repeat it a runtime-determined
number of times, with each iteration able to use the previous result. A
conditional loop with `until` and `max_iterations` runs its body at least once,
and each retry keeps a separate attempt UUID so iteration data can be cleared
selectively.

### Retry policies and human input

Set a task's `retry_policy` to decide whether and when it retries, for example
to retry only on selected exceptions. A failed child DAG run can now retry its
waiting `TriggerDagRunOperator` task, and non-deferrable waits honor the task's
retry policy. A retry policy can reschedule a task without consuming a retry.

Install `apache-airflow-providers-standard` to use `HITLOperator`,
`ApprovalOperator`, or `HITLEntryOperator`. Check for `awaiting_input` when
polling or filtering task instances waiting for a human response. The triggerer
handles the wait.

### Deadline callbacks

Deadline Alerts are experimental in Airflow 3.2.0. A DAG can pass
`deadline=[first_alert, second_alert]` and mix `SyncCallback` and `AsyncCallback`
in the same list. In 3.3.0, `SyncCallback` can resolve Connections and Variables,
and callbacks may be defined in the same module as the DAG. Use
`callback_execution_timeout` to limit callback execution time.

`DeadlineAlert` accepts exact `AsyncCallback` or `SyncCallback` instances at
parse time. Numeric second counts are deprecated and booleans are rejected,
so use `timedelta` or `VariableInterval`.

Deadline callback kwargs are decoded where the callback runs, in the triggerer
for `AsyncCallback` and on the worker for `SyncCallback`. Upgrade core and
`apache-airflow-task-sdk` together on workers that run synchronous Deadline Alerts.

### Local testing and streamed run results

`airflow dags test` runs tasks with a local task runner for testing and debugging.
Use `airflow dags backfill` when you need a backfill job.

In 3.3.0, `airflow dags test` waits for input when a human-in-the-loop task is
parked. Supply the required response to continue the test.

`airflow tasks test` exports `AIRFLOW_TEST_MODE` by default, including
invocations that omit `--env-vars`.

`GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/wait` streams newline-delimited
JSON until the run finishes. Pass a task ID as `result` to include its XCom
result. When requesting `result` on the DAG-run wait endpoint, the caller also
needs permission to read the corresponding XCom.

Files in this skill

  • SKILL.md9.2 KB
  • coverage.json817 B
  • references/api-cli-ui.md4.2 KB
  • references/assets-partitions.md3.7 KB
  • references/dag-task-authoring.md4.9 KB
  • references/execution-deployment.md4.7 KB
  • references/extensions-serialization.md3.7 KB
  • references/migration-configuration.md6.4 KB
  • references/observability-security.md3.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.