You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/10/14 18:38:43 UTC

[GitHub] [airflow] jedcunningham opened a new pull request, #27064: Avoid 500 on dag redirect

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

   A 500 could happen if the dag_id was passed in the path and as a query param. This prioritizes the path in that situation.


-- 
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] dstandish commented on a diff in pull request #27064: Avoid 500 on dag redirect

Posted by GitBox <gi...@apache.org>.
dstandish commented on code in PR #27064:
URL: https://github.com/apache/airflow/pull/27064#discussion_r996045701


##########
airflow/www/views.py:
##########
@@ -2454,7 +2454,8 @@ def success(self):
     @action_logging
     def dag(self, dag_id):
         """Redirect to default DAG view."""
-        return redirect(url_for('Airflow.grid', dag_id=dag_id, **request.args))
+        kwargs = {**request.args, "dag_id": dag_id}

Review Comment:
   it seems the effect here is not to merely _prioritize_ the path, but to always ignore the query param... is that right?



-- 
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] jedcunningham commented on a diff in pull request #27064: Avoid 500 on dag redirect

Posted by GitBox <gi...@apache.org>.
jedcunningham commented on code in PR #27064:
URL: https://github.com/apache/airflow/pull/27064#discussion_r996053298


##########
airflow/www/views.py:
##########
@@ -2454,7 +2454,8 @@ def success(self):
     @action_logging
     def dag(self, dag_id):
         """Redirect to default DAG view."""
-        return redirect(url_for('Airflow.grid', dag_id=dag_id, **request.args))
+        kwargs = {**request.args, "dag_id": dag_id}

Review Comment:
   Oh, yes, that's correct. Let me reword the commit.



-- 
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] dstandish commented on a diff in pull request #27064: Avoid 500 on dag redirect

Posted by GitBox <gi...@apache.org>.
dstandish commented on code in PR #27064:
URL: https://github.com/apache/airflow/pull/27064#discussion_r996045701


##########
airflow/www/views.py:
##########
@@ -2454,7 +2454,8 @@ def success(self):
     @action_logging
     def dag(self, dag_id):
         """Redirect to default DAG view."""
-        return redirect(url_for('Airflow.grid', dag_id=dag_id, **request.args))
+        kwargs = {**request.args, "dag_id": dag_id}

Review Comment:
   it seems the effect here is not to prioritize the path, but to always ignore the query param... is that right?



-- 
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] jedcunningham merged pull request #27064: Avoid 500 on dag redirect

Posted by GitBox <gi...@apache.org>.
jedcunningham merged PR #27064:
URL: https://github.com/apache/airflow/pull/27064


-- 
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] jedcunningham commented on a diff in pull request #27064: Avoid 500 on dag redirect

Posted by GitBox <gi...@apache.org>.
jedcunningham commented on code in PR #27064:
URL: https://github.com/apache/airflow/pull/27064#discussion_r996053298


##########
airflow/www/views.py:
##########
@@ -2454,7 +2454,8 @@ def success(self):
     @action_logging
     def dag(self, dag_id):
         """Redirect to default DAG view."""
-        return redirect(url_for('Airflow.grid', dag_id=dag_id, **request.args))
+        kwargs = {**request.args, "dag_id": dag_id}

Review Comment:
   Oh, yes, that's correct. Let me reword the desc.



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