-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Remove TaskContextLogger #43183
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
Remove TaskContextLogger #43183
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,6 @@ | |
|
|
||
| from __future__ import annotations | ||
|
|
||
| import inspect | ||
| import logging | ||
| import os | ||
| from contextlib import suppress | ||
|
|
@@ -238,10 +237,6 @@ def set_context(self, ti: TaskInstance, *, identifier: str | None = None) -> Non | |
| self.handler.setLevel(self.level) | ||
| return SetContextPropagate.MAINTAIN_PROPAGATE if self.maintain_propagate else None | ||
|
|
||
| @cached_property | ||
| def supports_task_context_logging(self) -> bool: | ||
| return "identifier" in inspect.signature(self.set_context).parameters | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we intend to keep accepting the This param was also extended to be used in the
It seems the conditionals around AF versions in those provider PRs were removed & cleaned up when those providers started having Airflow min version as 2.8 -- in PR #42764 If we decide to drop the param, perhaps would also be a good idea to add a TODO in those providers saying that this param would no longer be needed/used when min AF version is 3.0 & can be cleaned up.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a good point. I thought about it and figured that it's ok to leave it even if it is not currently used. Unless there's some backcompat issue with leaving it but i don't think there is. Do you see any other backcompat concerns with this PR otherwise?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah. I think we should drop it - and actually - if we are going to add documentation for Airlfow 3, I think we should promote and look more closely into open-telemetry trace integration, which is essentially doing exactly what have been done here (and more). Open Telemetry span is equivalent to the identifier, but there is already tooling (all tools that support open-telemetry spans) that understand and are able to visualise spans across distributed systems. So I'd say we should make it clearer and explain to people on how they can connect those tools to see relations between things like errors raised in other parts of the system that are related to particular tasks. This was a very important point raised in the debugging survey - that it is difficult to debug issues in a distributed environment, and IMHO open-telemetry and better integration with it is the answer to that need and maybe we shoudl somehow think about making it more obvious (and learn ourselves how to do it).
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I can't think of any backcompat issues otherwise :), just felt that we would have there an unused param and thought to highlight it once. |
||
|
|
||
| @staticmethod | ||
| def add_triggerer_suffix(full_path, job_id=None): | ||
| """ | ||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| Remove TaskContextLogger | ||
|
|
||
| We introduced this as a way to inject messages into task logs from places | ||
| other than the task execution context. We later realized that we were better off | ||
| just using the Log table. | ||
dstandish marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.