apache / apache/airflow

Airflow API for 'airflow dags reserialize'

Open
#47,844 4 comments 0 reactions 0 assignees View on GitHub
area:API kind:feature
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 10h
Merged PRs (30d)
483

Description

### Description

An Airflow API endpoint to programatically reserialize dags, aligned with the `airflow dags reserialize `CLI command:
https://airflow.apache.org/docs/apache-airflow/stable/cli-and-env-variables-ref.html#reserialize

### Use case/motivation

Currently, I must exec into my Airflow webserver in order to run the CLI command to refresh dags.

However, I already have an Airflow client programatically communicating to the Airflow webserver API. It would be great to be able to request the API to refresh dags when required.

As a temporary solution, I have set a low interval of 1s for:
- min_serialized_dag_update_interval
- min_serialized_dag_fetch_interval

But have found high constant resource usage as a result to the Airflow services.

### Related issues

An extension of https://github.com/apache/airflow/issues/19432

### Are you willing to submit a PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

Contributor guide

Open the contributing guide

Research direction

Start with the documented `airflow dags reserialize` CLI command and the related issue #19432 to understand the existing behavior. Identify the Airflow webserver API entry point that should expose the same DAG reserialization operation. Done means clients can request a refresh through the API without exec access and the behavior matches the CLI command.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.