Deprecate implicit REMOTE_TASK_LOG registration in ES task handler#67105
Open
jason810496 wants to merge 1 commit into
Open
Deprecate implicit REMOTE_TASK_LOG registration in ES task handler#67105jason810496 wants to merge 1 commit into
REMOTE_TASK_LOG registration in ES task handler#67105jason810496 wants to merge 1 commit into
Conversation
eladkal
approved these changes
May 20, 2026
…andler ``ElasticsearchTaskHandler.__init__`` papered over a missing ``REMOTE_TASK_LOG`` by self-registering as the remote task-log reader during ``dictConfig``. That side-effect is now deprecated and will be removed in a future provider release. - Emit ``AirflowProviderDeprecationWarning`` (``stacklevel=1`` so module-based filters match through ``dictConfig``) when the handler falls back to the implicit registration path. - Add a logging guide under ``providers/elasticsearch/docs/logging/`` that documents the recommended override: set ``REMOTE_TASK_LOG = ElasticsearchRemoteLogIO(...)`` at module scope in your ``[logging] logging_config_class`` module. - Add a provider-local ``conftest.py`` that suppresses the new deprecation warning during direct handler construction in unit tests (mirroring the recommended user pattern).
1a8a574 to
6724899
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
logging_config_classcontract and documentREMOTE_TASK_LOG#67104Why
ElasticsearchTaskHandler.__init__papers over a missingREMOTE_TASK_LOGin the user's[logging] logging_config_classmodule by self-registering as the remote task-log reader duringdictConfig. That side-effect was the only thing keeping UI log read-back working for users who had swapped in the ES handler via a custom logging config, and it hides the real contract (REMOTE_TASK_LOGmust be set at module scope) that the core PR (#67104) documents.How
AirflowProviderDeprecationWarningfrom the implicit-registration branch inElasticsearchTaskHandler.__init__, withstacklevel=1so module-based deprecation filters still match throughdictConfig.providers/elasticsearch/docs/logging/that shows the recommended override: setREMOTE_TASK_LOG = ElasticsearchRemoteLogIO(...)at module scope in the user'slogging_config_classmodule, plus an Airflow / provider version compatibility matrix for the supported configurations.conftest.pythat suppresses the new deprecation warning during direct handler construction in unit tests — this mirrors the recommended user pattern (REMOTE_TASK_LOGset at module scope) so the forbidden-warnings plugin does not flag handler instantiation in tests.Was generative AI tooling used to co-author this PR?