Deprecate implicit REMOTE_TASK_LOG registration in OS task handler#67106
Merged
jason810496 merged 1 commit intoMay 22, 2026
Conversation
``OpensearchTaskHandler.__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. - Update the OpenSearch logging guide to set ``REMOTE_TASK_LOG = OpensearchRemoteLogIO(...)`` at module scope in the ``[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).
eladkal
approved these changes
May 20, 2026
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
OpensearchTaskHandler.__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 OS 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 inOpensearchTaskHandler.__init__, withstacklevel=1so module-based deprecation filters still match throughdictConfig.providers/opensearch/docs/logging/index.rst) to setREMOTE_TASK_LOG = OpensearchRemoteLogIO(...)at module scope in the user'slogging_config_classmodule instead of relying on the deprecated self-registration.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?