-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use default view in dr op link #11778
Use default view in dr op link #11778
Conversation
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
airflow/operators/dagrun_operator.py
Outdated
@@ -38,7 +39,8 @@ class TriggerDagRunLink(BaseOperatorLink): | |||
name = 'Triggered DAG' | |||
|
|||
def get_link(self, operator, dttm): | |||
return f"/graph?dag_id={operator.trigger_dag_id}&root=&execution_date={quote(dttm.isoformat())}" | |||
view = conf.get('webserver', 'dag_default_view').lower() | |||
return f"/{view}?dag_id={operator.trigger_dag_id}&root=&execution_date={quote(dttm.isoformat())}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add base_url here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid now it won't work properly if you run Airflow with base_url
or [proxy-fix-prefix
]https://airflow.readthedocs.io/en/latest/configurations-ref.html#proxy-fix-x-prefix] configured.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When Airflow is installed at http://localhost:8080/my-company/airflow,
users will redirect to http://localhost:8080/graph
instead of http://localhost:8080/my-company/airflow/graph
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using base_url
in the url and using breeze I'm redirected to localhost:8080
instead of 0.0.0.0:28080
. So I think we don't have to use it it in url.
When using url_for
then the link doesn't work at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it remains an open issue for v2 when prefixing /base/
in base_url
. Is there any issue open here for tracking?
This comment has been minimized.
This comment has been minimized.
99fd7c2
to
72daac8
Compare
The PR needs to run all tests because it modifies core of Airflow! Please rebase it to latest master or ask committer to re-run it! |
1a9c4af
to
a90b692
Compare
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
a953de0
to
0e3855e
Compare
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.