Feature/dags reserialize core api 1 #1
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR will resolve?
The GitHub issue [#47844](apache#47844) proposes adding a REST API endpoint to Apache Airflow to programmatically trigger the DAG reserialization process, which is currently only accessible via the CLI command
airflow dags reserialize
.Summary of the Issue
Current Limitation: To refresh DAGs, users must execute the CLI command directly on the Airflow webserver, which is inconvenient for automated workflows or remote management. ([Session Fixation in apache-airflow | CVE-2023-40273 | Snyk](https://security.snyk.io/vuln/SNYK-PYTHON-APACHEAIRFLOW-5855819?utm_source=chatgpt.com))
Proposed Enhancement: Introduce a REST API endpoint that mirrors the functionality of the
airflow dags reserialize
CLI command, allowing external clients to initiate DAG reserialization without direct server access.Use Case: Facilitates programmatic DAG refreshes through existing Airflow API clients, enhancing automation and integration capabilities.
Steps to Resolve
Design the API Endpoint: Define the API route, HTTP method (likely
POST
), and request/response schema for triggering DAG reserialization.Implement the Endpoint: Develop the backend logic to handle the API request and invoke the DAG reserialization process.
Security Considerations: Ensure that only authorized users can access this endpoint, possibly by integrating with Airflow's existing authentication and authorization mechanisms.
Testing: Write unit and integration tests to validate the functionality and security of the new API endpoint.
Documentation: Update the Airflow API documentation to include the new endpoint, detailing its usage and any necessary permissions.
Status
As of the latest update, a pull request [#48174](apache#48174) has been submitted to address this feature request. Reviewing and merging this PR would implement the proposed API endpoint, resolving the issue.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in airflow-core/newsfragments.