Content-Length: 411676 | pFad | http://github.com/apache/airflow/pull/50376

0C Implementing `log_url` on RuntimeTaskInstance in task sdk by ayush3singh · Pull Request #50376 · apache/airflow · GitHub
Skip to content

Implementing log_url on RuntimeTaskInstance in task sdk #50376

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

Merged
merged 1 commit into from
May 16, 2025

Conversation

ayush3singh
Copy link
Contributor

@ayush3singh ayush3singh commented May 8, 2025

Fixes #50330

The log_url variable is required in the email.html template. Since the configuration has been removed it is raising exception when log_url and mark_success_url is being used to send email notifications.

This PR adds both to the task instance context (context.ti) during execution.
In previous versions of Airflow, during execution ti.log_url was available,

This PR introduces the following changes:

  • Adds log_url to RuntimeTaskInstance
  • Adds log_url property to ti in get_template_context since context['ti'] needs to have log_url

@boring-cyborg boring-cyborg bot added area:Executors-core LocalExecutor & SequentialExecutor area:task-sdk labels May 8, 2025
@ayush3singh
Copy link
Contributor Author

@tirkarthi for review and guidence

@ayush3singh ayush3singh force-pushed the issue_50330 branch 4 times, most recently from 0e285f2 to a591c6d Compare May 9, 2025 21:45
@ayush3singh ayush3singh marked this pull request as ready for review May 10, 2025 07:05
@ayush3singh
Copy link
Contributor Author

@amoghrajesh please review

Thanks

Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking ok, some comments.

@ayush3singh ayush3singh force-pushed the issue_50330 branch 3 times, most recently from 43f57d1 to d07bd3c Compare May 10, 2025 20:25
@ayush3singh ayush3singh force-pushed the issue_50330 branch 4 times, most recently from d969b1b to ea00cd9 Compare May 11, 2025 18:18
@amoghrajesh amoghrajesh changed the title Fixes issue RuntimeTaskInstance context does not contain log_url Implementing log_url on RuntimeTaskInstance in task sdk May 12, 2025
Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1, thanks.

@mobuchowski are you ok with the OL side of things?

Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me +1

@kacpermuda ok from OL side?

@kacpermuda
Copy link
Contributor

Yes @amoghrajesh , looks good, thanks !

@amoghrajesh amoghrajesh added this to the Airflow 3.1.0 milestone May 16, 2025
@amoghrajesh amoghrajesh merged commit 330789e into apache:main May 16, 2025
69 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Executors-core LocalExecutor & SequentialExecutor area:task-sdk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RuntimeTaskInstance context does not contain log_url
4 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/apache/airflow/pull/50376

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy