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

Log URL redirecting to No XCom error #44337

Open
1 of 2 tasks
sam-gen-cop opened this issue Nov 25, 2024 · 1 comment
Open
1 of 2 tasks

Log URL redirecting to No XCom error #44337

sam-gen-cop opened this issue Nov 25, 2024 · 1 comment
Labels
area:core area:UI Related to UI/UX. For Frontend Developers. kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet

Comments

@sam-gen-cop
Copy link

sam-gen-cop commented Nov 25, 2024

Apache Airflow version

Other Airflow 2 version (please specify below)

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

2.10.1

What happened?

The Log URL (ti.log_url) from the triggered retry email doesn't redirect to the Logs when clicked but instead shows 'No XCom' as the error in the Airflow UI. The Logs are shown when a time in future is selected as the base_date in the UI.

Before changing the base_date in the UI,

image

After adding 1 second to the base_date in UI,

image

What you think should happen instead?

I think the issue might be due to milli seconds getting truncated which causes the difference between the execution datetime (untruncated) and the execution datetime rendered - base_date (truncated) in the ti.log_url

How to reproduce

Here is the DAG to reproduce the issue,

from airflow.decorators import dag, task
from datetime import datetime, timedelta

@dag(
    dag_id='default_email_on_retry_example',
    schedule_interval='@once',
    start_date=datetime(2023, 1, 1),
    catchup=False,
    default_args={
        'email': ['[email protected]'],  
        'email_on_retry': True,  
        'email_on_failure': False,  
    },
)
def default_email_on_retry_dag():

    @task
    def success_task():
        print("This task will always succeed!")

    @task(task_id='retry_task', retries=3, retry_delay=timedelta(seconds=15))
    def retry_task():
        print("This task will retry and fail.")
        raise Exception("Simulated task failure for retry.")

    success = success_task()
    retry = retry_task()

    success >> retry

default_email_on_retry_dag()

image

Click the Log Link from the email triggered by the DAG

Operating System

Linux

Versions of Apache Airflow Providers

No response

Deployment

Amazon (AWS) MWAA

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

@sam-gen-cop sam-gen-cop added area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels Nov 25, 2024
Copy link

boring-cyborg bot commented Nov 25, 2024

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

@dosubot dosubot bot added the area:UI Related to UI/UX. For Frontend Developers. label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core area:UI Related to UI/UX. For Frontend Developers. kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet
Projects
None yet
Development

No branches or pull requests

1 participant