kremogen opened a new pull request, #65839:
URL: https://github.com/apache/airflow/pull/65839

   Today, if you want to trigger a DAG reparse from outside Airflow, you either 
shell into the webserver and run `airflow dags reserialize`, or call `PUT 
/parseDagFile/{file_token}` — which needs an opaque signed token you first have 
to fetch from the DAG endpoint. Neither is great when all your client has is a 
`dag_id`
   
   This PR adds `PUT /api/v2/dags/{dag_id}/reparse`. You give it a `dag_id`, it 
looks up the file behind that DAG and queues a priority parsing request 
processing side.
   
   Returns:                                                                     
                                         
     - `201` - queued
     - `404` - no such DAG
     - `409` - parsing request for that file is already queued
     - `401` / `403` — usual auth responses
   
   Authorization is `requires_access_dag(method="PUT")`, same as the existing 
parse endpoint, and the action goes through `action_logging()` so it shows up 
in the audit log as `reparse_dag`. 
   
   Tests cover the happy path, duplicate request (409), unknown dag_id (404), 
unauthenticated (401) and unauthorized (403).
   
   closes: #47844


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to