airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacopo Farina (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-1061) Log URL in Task Instance list is incorrect when running locally
Date Sat, 18 Nov 2017 00:43:02 GMT

    [ https://issues.apache.org/jira/browse/AIRFLOW-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16257819#comment-16257819
] 

Jacopo Farina commented on AIRFLOW-1061:
----------------------------------------

Found that a simple solution is to remove the BASE_URL from that line and have:

{code:python}
    @property
    def log_url(self):
        iso = self.execution_date.isoformat()
        return (
            "/admin/airflow/log"
            "?dag_id={self.dag_id}"
            "&task_id={self.task_id}"
            "&execution_date={iso}"
        ).format(**locals())
{code}

this works on any host and port because the server uses the same base path of the page.

> Log URL in Task Instance list is incorrect when running locally
> ---------------------------------------------------------------
>
>                 Key: AIRFLOW-1061
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1061
>             Project: Apache Airflow
>          Issue Type: Bug
>    Affects Versions: Airflow 1.8
>            Reporter: Nicholas Duffy
>
> The Log URL in the Task Instance list links to BASE_URL + /admin/airflow/log (https://github.com/apache/incubator-airflow/blob/d8c0f59d5d627efb65b47264d5169e3626195839/airflow/models.py#L936)
while it should link to only /admin/airflow/log.
> The current behavior causes the link to be incorrect if you are running Airflow locally.

> Example:
> - Running Airflow on Vagrant on my local machine
> - URL is http://127.0.0.1:8080
> - Browse to task instance list at http://127.0.0.1:8080/admin/taskinstance/
> - Click the Log URL book glyphicon
> - The link takes you to http://mybaseurl.com/admin/airflow/log/
> - I expect the link to go to http://127.0.0.1:8080/admin/airflow/log/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message