Skip to content
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

Task Instance returning wrong url through log_url #45395

Open
1 of 2 tasks
fbmatilla opened this issue Jan 4, 2025 · 2 comments
Open
1 of 2 tasks

Task Instance returning wrong url through log_url #45395

fbmatilla opened this issue Jan 4, 2025 · 2 comments
Labels
affected_version:2.10 Issues Reported for 2.10 area:core area:logging area:UI Related to UI/UX. For Frontend Developers. Can't Reproduce The problem cannot be reproduced kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet pending-response

Comments

@fbmatilla
Copy link

Apache Airflow version

2.10.4

If "Other Airflow 2 version" selected, which one?

No response

What happened?

Hi,

Looks like the URL returned through the property log_url is not right:

image

This URL is not opening correctly the task logs (nothing selected) and seems to be the base_date the issue:
image

If we remove the base_date from the URL now it is open correctly:

image

Thank you!

What you think should happen instead?

No response

How to reproduce

Just set up the Airflow SMTP and create and run a DAG raising an error.

Operating System

Ubuntu 20.04.5

Versions of Apache Airflow Providers

apache-airflow-providers-microsoft-mssql==3.9.1
apache-airflow-providers-snowflake==5.8.0
apache-airflow-providers-microsoft-azure==11.0.0
apache-airflow-providers-http==4.13.2
apache-airflow-providers-cncf-kubernetes==9.0.1
apache-airflow-providers-common-sql==1.19.0
apache-airflow-providers-google==10.25.0

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

@fbmatilla fbmatilla added area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels Jan 4, 2025
@dosubot dosubot bot added area:logging area:UI Related to UI/UX. For Frontend Developers. labels Jan 4, 2025
@gopidesupavan
Copy link
Member

Cant reproduce this issue, please provide the dag your using.

Looking at your first screenshot your it seems your on XCom tab?. try refresh and check

@eladkal eladkal added Can't Reproduce The problem cannot be reproduced affected_version:2.10 Issues Reported for 2.10 labels Jan 5, 2025
@fbmatilla
Copy link
Author

Hi @gopidesupavan,

thank you for your reply.

It is really weird because the selected menu is "Logs" but in the body you see "No XCom".

In order to reproduce it you will need to:

1.- Set up the smtp_default connection to a right SMTP server:
image

2.- Put the following DAG in you DAG folder, and please change "[email protected]" by your email:


from airflow import DAG
from airflow.utils.dates import days_ago
from airflow.operators.python import PythonOperator
from typing import Any


default_args = {
    'owner': 'Axesor',
    'depends_on_past': False,
    'start_date': days_ago(1),
    'email': "[email protected]",
    'email_on_failure': True
}



def task_1(ds: Any, **kwargs: Any) -> None:
    raise Exception("Error")


with DAG(
    'example',
    schedule_interval=None,
    default_args=default_args
) as dag:

    task1 = PythonOperator (
        task_id="task_1",
        python_callable=task_1
    )

    task1

3.- Run the DAG and you will receive an email like this:
image

4.- If you click on the Log link you will see the "No XCom" in the main screen and if you remove the base_date from the URL then you will see the logs now correctly.

Let me know please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected_version:2.10 Issues Reported for 2.10 area:core area:logging area:UI Related to UI/UX. For Frontend Developers. Can't Reproduce The problem cannot be reproduced kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet pending-response
Projects
None yet
Development

No branches or pull requests

3 participants