{"id":1903,"library":"apache-airflow-core","title":"Apache Airflow Core","description":"Apache Airflow Core (part of the main `apache-airflow` distribution) provides the foundational components for the Apache Airflow platform, a powerful tool for programmatically authoring, scheduling, and monitoring data workflows. It includes the scheduler, API server, DAG file processor, and triggerer. Workflows, known as Directed Acyclic Graphs (DAGs), are defined as Python code, making them maintainable, versionable, and collaborative. Airflow follows semantic versioning, with minor releases typically every 2-3 months and patch releases as needed. Major versions, such as 3.x, introduce backwards-incompatible changes and are released on an irregular schedule. The current version of `apache-airflow` is 3.2.0.","status":"active","version":"3.2.0","language":"en","source_language":"en","source_url":"https://github.com/apache/airflow","tags":["airflow","automation","dag","data","orchestration","pipelines","workflow","etl","scheduler","api"],"install":[{"cmd":"pip install \"apache-airflow[standard]==3.2.0\" --constraint \"https://raw.githubusercontent.com/apache/airflow/constraints-3.2.0/constraints-3.10.txt\"","lang":"bash","label":"Recommended reproducible installation for Airflow 3.2.0 with Python 3.10"},{"cmd":"pip install \"apache-airflow[standard]==AIRFLOW_VERSION\" --constraint \"https://raw.githubusercontent.com/apache/airflow/constraints-AIRFLOW_VERSION/constraints-PYTHON_VERSION.txt\"","lang":"bash","label":"General reproducible installation (replace placeholders)"}],"dependencies":[],"imports":[{"symbol":"DAG","correct":"from airflow import DAG"},{"symbol":"datetime","correct":"from datetime import datetime"},{"symbol":"BashOperator","correct":"from airflow.operators.bash import BashOperator"},{"symbol":"PythonOperator","correct":"from airflow.operators.python import PythonOperator"}],"quickstart":{"code":"from airflow import DAG\nfrom airflow.operators.bash import BashOperator\nfrom datetime import datetime, timedelta\n\nwith DAG(\n    dag_id='hello_world_dag',\n    start_date=datetime(2026, 1, 1),\n    schedule_interval=timedelta(days=1),\n    catchup=False, # Default in Airflow 3.x is False\n    tags=['example'],\n) as dag:\n    start_task = BashOperator(\n        task_id='start',\n        bash_command='echo \"Starting hello_world_dag\"',\n    )\n\n    hello_task = BashOperator(\n        task_id='hello',\n        bash_command='echo \"Hello, Airflow!\"',\n    )\n\n    world_task = BashOperator(\n        task_id='world',\n        bash_command='echo \"This is a simple DAG.\"',\n    )\n\n    end_task = BashOperator(\n        task_id='end',\n        bash_command='echo \"Finished hello_world_dag\"',\n    )\n\n    start_task >> hello_task >> world_task >> end_task\n","lang":"python","description":"This quickstart defines a simple 'Hello World' DAG. To run it locally, first install Apache Airflow (see 'install' section). Then, initialize the database and start Airflow components using `airflow standalone`. Place this Python file in your configured `AIRFLOW_HOME/dags` directory, then access the Airflow UI at `localhost:8080`, log in (admin/admin by default for `standalone`), and unpause the `hello_world_dag`."},"warnings":[{"fix":"Refactor DAGs and custom operators to use the Airflow REST API or the Task Execution API for runtime interactions (state transitions, heartbeats, XComs, resource fetching). Utilize the Airflow Python Client where appropriate.","message":"Direct database access from worker nodes and tasks has been removed in Airflow 3.x. Tasks and custom operators must now communicate through the REST API instead of direct database connections. Existing DAGs and custom operators that accessed the metadata database directly will require refactoring.","severity":"breaking","affected_versions":"3.x and greater"},{"fix":"Migrate existing SubDAGs to use `TaskGroups` for grouping tasks, or explore Assets and Data Aware Scheduling for alternative architectural patterns.","message":"SubDAGs have been removed in Airflow 3.x. They are replaced by `TaskGroups`, Assets, and Data Aware Scheduling.","severity":"breaking","affected_versions":"3.x and greater"},{"fix":"Update any integrations or custom tools that interact with the Airflow REST API to use the `/api/v2` endpoints. Refer to the Airflow API v2 documentation.","message":"The `/api/v1` REST API has been replaced by the modern FastAPI-based `/api/v2`.","severity":"breaking","affected_versions":"3.x and greater"},{"fix":"Explicitly set `catchup=True` in your DAG definition if you intend for it to run for past missed schedules. Review existing DAGs to ensure the desired catchup behavior is maintained.","message":"The `catchup_by_default` DAG parameter is now `False` by default in Airflow 3.x, changing the default behavior for DAGs scheduled to run for past intervals.","severity":"breaking","affected_versions":"3.x and greater"},{"fix":"Plan and execute an upgrade to Airflow 3.x. Utilize tools like Ruff with AIR rules (version 0.13.1 or later) to check DAG compatibility and automate parts of the migration.","message":"Airflow 2.x reaches its end-of-life in April 2026. Staying on Airflow 2.x after this date will introduce security risks as CVEs cannot be patched anymore due to old dependencies.","severity":"deprecated","affected_versions":"<3.0.0"},{"fix":"Always use the official constraint files for reproducible Airflow installations. Example: `pip install \"apache-airflow[EXTRAS]==AIRFLOW_VERSION\" --constraint \"https://raw.githubusercontent.com/apache/airflow/constraints-AIRFLOW_VERSION/constraints-PYTHON_VERSION.txt\"`.","message":"Plain `pip install apache-airflow` might occasionally lead to an unusable installation due to dependency conflicts. Airflow keeps its dependencies open (in `pyproject.toml`) for user flexibility, but this requires careful management.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}