Skip to content

Clarify logging_config_class contract and document REMOTE_TASK_LOG#67104

Open
jason810496 wants to merge 1 commit into
apache:mainfrom
jason810496:refactor/logging/clarify-logging-config-class-core
Open

Clarify logging_config_class contract and document REMOTE_TASK_LOG#67104
jason810496 wants to merge 1 commit into
apache:mainfrom
jason810496:refactor/logging/clarify-logging-config-class-core

Conversation

@jason810496
Copy link
Copy Markdown
Member

@jason810496 jason810496 commented May 18, 2026

Why

[logging] logging_config_class is documented as a "Logging class" but actually resolves to a logging.config.dictConfig dict, and the REMOTE_TASK_LOG / DEFAULT_REMOTE_CONN_ID side channel that powers remote log read-back was undocumented.

So custom configs silently lost UI log read-back, and ElasticsearchTaskHandler / OpensearchTaskHandler papered over it by self-registering from inside __init__. The provider-side deprecation of that self-registration is split into follow-up PRs (one for elasticsearch, one for opensearch); this PR is the core/SDK/shared-library piece they depend on.

How

  • Document the real contract for logging_config_class (dict, not class) and the REMOTE_TASK_LOG / DEFAULT_REMOTE_CONN_ID module-level attributes in the config option help, advanced-logging-configuration.rst, and the discover_remote_log_handler docstring.
  • Add a startup WARNING for the case that "user module is missing REMOTE_TASK_LOG while remote_logging is on". The warning is emitted from configure_logging after dictConfig runs, so the check sees the final state — important because the deprecated ES/OS self-registration path populates _ActiveLoggingConfig.remote_task_log from inside the handler __init__.
  • Drop the remote_logging_enabled parameter from discover_remote_log_handler (no longer needed now that the warning lives in configure_logging).
  • Add unit tests for _warn_if_missing_remote_task_log.

Was generative AI tooling used to co-author this PR?

``[logging] logging_config_class`` is documented as a "Logging class" but
actually resolves to a ``logging.config.dictConfig`` dict, and the
``REMOTE_TASK_LOG`` / ``DEFAULT_REMOTE_CONN_ID`` side channel that powers
remote log read-back was undocumented. Custom configs silently lost UI log
read-back as a result.

- Document the real contract for ``logging_config_class`` (dict, not class)
  and the ``REMOTE_TASK_LOG`` / ``DEFAULT_REMOTE_CONN_ID`` module-level
  attributes in the config option help, ``advanced-logging-configuration.rst``,
  and the ``discover_remote_log_handler`` docstring.
- Add a startup ``WARNING`` when ``remote_logging`` is on but the user's
  logging module is missing ``REMOTE_TASK_LOG``, emitted from
  ``configure_logging`` after ``dictConfig`` runs so it sees the final state.
@amoghrajesh
Copy link
Copy Markdown
Contributor

@jason810496 I wanna take a look at this one but do not have b/w atm, will do soon

@eladkal
Copy link
Copy Markdown
Contributor

eladkal commented May 20, 2026

I think we will need to bump

"elasticsearch": parse_version("6.5.0"),
"opensearch": parse_version("1.9.0"),

as part of this PR but we will need to wait for providers to be released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants