You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "lukasz-worek (via GitHub)" <gi...@apache.org> on 2023/03/01 13:52:00 UTC

[GitHub] [airflow] lukasz-worek opened a new issue, #29839: Calling endpoint dags/{dag_id}/dagRuns for removed DAG returns "500 Internal Server Error" instead of "404 Not Found"

lukasz-worek opened a new issue, #29839:
URL: https://github.com/apache/airflow/issues/29839

   ### Apache Airflow version
   
   Other Airflow 2 version (please specify below)
   
   ### What happened
   
   Apache Airflow version:  2.4.0
   
   I remove DAG from storage then trigger it:
   
   curl -X POST 'http://localhost:8080/api/dags/<DAG_ID>/dag_runs' --header 'Content-Type: application/json' --data '{"dag_run_id":"my_id"}'
   
   it returns:
   ```
   
   Traceback (most recent call last):
     File &#34;/home/airflow/.local/lib/python3.8/site-packages/flask/app.py&#34;, line 2525, in wsgi_app
       response = self.full_dispatch_request()
     File &#34;/home/airflow/.local/lib/python3.8/site-packages/flask/app.py&#34;, line 1822, in full_dispatch_request
       rv = self.handle_user_exception(e)
     File &#34;/home/airflow/.local/lib/python3.8/site-packages/flask/app.py&#34;, line 1820, in full_dispatch_request
       rv = self.dispatch_request()
     File &#34;/home/airflow/.local/lib/python3.8/site-packages/flask/app.py&#34;, line 1796, in dispatch_request
       return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
     File &#34;/home/airflow/.local/lib/python3.8/site-packages/connexion/decorators/decorator.py&#34;, line 68, in wrapper
       response = function(request)
     File &#34;/home/airflow/.local/lib/python3.8/site-packages/connexion/decorators/uri_parsing.py&#34;, line 149, in wrapper
       response = function(request)
     File &#34;/home/airflow/.local/lib/python3.8/site-packages/connexion/decorators/validation.py&#34;, line 196, in wrapper
       response = function(request)
     File &#34;/home/airflow/.local/lib/python3.8/site-packages/connexion/decorators/validation.py&#34;, line 399, in wrapper
       return function(request)
     File &#34;/home/airflow/.local/lib/python3.8/site-packages/connexion/decorators/response.py&#34;, line 112, in wrapper
       response = function(request)
     File &#34;/home/airflow/.local/lib/python3.8/site-packages/connexion/decorators/parameter.py&#34;, line 120, in wrapper
       return function(**kwargs)
     File &#34;/home/airflow/.local/lib/python3.8/site-packages/airflow/api_connexion/security.py&#34;, line 51, in decorated
       return func(*args, **kwargs)
     File &#34;/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/session.py&#34;, line 75, in wrapper
       return func(*args, session=session, **kwargs)
     File &#34;/home/airflow/.local/lib/python3.8/site-packages/airflow/api_connexion/endpoints/dag_run_endpoint.py&#34;, line 310, in post_dag_run
       dag_run = dag.create_dagrun(
   AttributeError: &#39;NoneType&#39; object has no attribute &#39;create_dagrun&#39;
   ```
   
   
   ### What you think should happen instead
   
   should response with 404 "A specified resource is not found."
   
   ### How to reproduce
   
   - remove existing DAG file from storage
   - create a new DAG run using API endpoint /api/dags/<DAG_ID>/dag_runs for that deleted DAG
   
   ### Operating System
   
   18.04.1 Ubuntu
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit 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)
   


-- 
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: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] SamWheating commented on issue #29839: Calling endpoint dags/{dag_id}/dagRuns for removed DAG returns "500 Internal Server Error" instead of "404 Not Found"

Posted by "SamWheating (via GitHub)" <gi...@apache.org>.
SamWheating commented on issue #29839:
URL: https://github.com/apache/airflow/issues/29839#issuecomment-1451086286

   I have replicated the issue locally in breeze and I'm working on a fix 👍 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] eladkal closed issue #29839: Calling endpoint dags/{dag_id}/dagRuns for removed DAG returns "500 Internal Server Error" instead of "404 Not Found"

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal closed issue #29839: Calling endpoint dags/{dag_id}/dagRuns for removed DAG returns "500 Internal Server Error" instead of "404 Not Found"
URL: https://github.com/apache/airflow/issues/29839


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] boring-cyborg[bot] commented on issue #29839: Calling endpoint dags/{dag_id}/dagRuns for removed DAG returns "500 Internal Server Error" instead of "404 Not Found"

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #29839:
URL: https://github.com/apache/airflow/issues/29839#issuecomment-1450185062

   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org