Open phi-friday opened 3 months ago
The request to the /extra_links
view causes a crash with the follow traceback:
[2024-09-19T03:38:49.712+0000] {app.py:1744} ERROR - Exception on /extra_links [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 2529, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/airflow/airflow/www/auth.py", line 226, in decorated
return _has_access(
^^^^^^^^^^^^
File "/opt/airflow/airflow/www/auth.py", line 139, in _has_access
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/airflow/airflow/utils/session.py", line 97, in wrapper
return func(*args, session=session, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/airflow/airflow/www/views.py", line 3231, in extra_links
url = task.get_extra_links(ti, link_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/airflow/airflow/models/abstractoperator.py", line 541, in get_extra_links
return link.get_link(self.unmap(None), ti_key=ti.key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/airflow/airflow/operators/trigger_dagrun.py", line 78, in get_link
return build_airflow_url_with_query(query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/airflow/airflow/utils/helpers.py", line 242, in build_airflow_url_with_query
return flask.url_for(f"Airflow.{view}", **query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/flask/helpers.py", line 256, in url_for
return current_app.url_for(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 2034, in url_for
return self.handle_url_build_error(error, endpoint, values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 2023, in url_for
rv = url_adapter.build( # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/werkzeug/routing/map.py", line 917, in build
raise BuildError(endpoint, values, method, self)
werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'Airflow.grid' with values ['dag_run_id']. Did you forget to specify values ['dag_id']
Has some similarity to #32150.
Apache Airflow version
2.9.3
If "Other Airflow 2 version" selected, which one?
No response
What happened?
When I create a
TriggerDagRunOperator
withpartial
andexpand_kwargs
, theTriggered DAG
link button appears to be disabled, and when I click it, it leads to the wrong link.incorrect url sample:
https://localhost:8080/www/dags/trigger_test/grid?tab=details&dag_run_id=manual__2024-07-31T00%3A27%3A35.113684%2B00%3A00&task_id=trigger&map_index=0
expected url sample:https://localhost:8080/www/dags/trigger_target/graph?dag_run_id=manual__2024-07-31T00%3A44%3A45.582823%2B00%3A00-0
What you think should happen instead?
No response
How to reproduce
Operating System
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"
Versions of Apache Airflow Providers
Deployment
Docker-Compose
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct