github-actions[bot] opened a new pull request, #76599:
URL: https://github.com/apache/airflow/pull/76599

   * Return 404 instead of 500 when DagRun is missing in Execution API
   
   In task_instances.py validate_inlets_and_outlets and task_state_store.py
   set_task_state_store, missing DagRun instances triggered unhandled
   AttributeError and ValueError exceptions that surfaced as HTTP 500
   Internal Server Errors.
   
   Catch the missing DagRun condition and return a clean 404 Not Found response
   matching the pattern established in PR 72890.
   
   Signed-off-by: 1fanwang <[email protected]>
   
   * Distinguish missing runs from other state backend errors
   
   Unrelated backend ValueErrors must not be reported as missing runs. Exercise 
writes racing actual run deletion instead of manufacturing impossible ORM 
results.
   
   Signed-off-by: 1fanwang <[email protected]>
   
   * Return 404 on task-state writes after a DagRun is deleted mid-request
   
   Signed-off-by: Stefan Wang <[email protected]>
   
   * Fix task state store 404 regression coverage
   
   The conflict merge kept the dedicated DagRunNotFound exception but retained 
an upstream test that raised ValueError, so current-head CI failed before 
exercising the route contract.
   
   Signed-off-by: Stefan Wang <[email protected]>
   
   * Test the narrowed ValueError handling where it changed, in the public API
   
   On main the Execution API route never caught ValueError, so the test there 
passed without this change. The public API used to turn any ValueError into a 
404.
   
   ---------
   (cherry picked from commit f90d2607dd4714bff26d13951a5344a64e1057f1)
   
   Co-authored-by: Stefan Wang <[email protected]>
   Signed-off-by: 1fanwang <[email protected]>
   Signed-off-by: Stefan Wang <[email protected]>
   Co-authored-by: pierrejeambrun <[email protected]>


-- 
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