Skip to content

Add CloudWatchRemoteLogIO.from_config and register cloudwatch scheme#69816

Draft
jason810496 wants to merge 1 commit into
apache:mainfrom
jason810496:feature/logging/cloudwatch-remote-log-io-from-config
Draft

Add CloudWatchRemoteLogIO.from_config and register cloudwatch scheme#69816
jason810496 wants to merge 1 commit into
apache:mainfrom
jason810496:feature/logging/cloudwatch-remote-log-io-from-config

Conversation

@jason810496

@jason810496 jason810496 commented Jul 13, 2026

Copy link
Copy Markdown
Member

Why

#67056 decoupled remote logging from the hardcoded branches in airflow_local_settings.py: core and the Task SDK now resolve the handler via ProvidersManager dispatch on the [logging] remote_base_log_folder URL scheme, instantiating the provider class through a no-arg from_config() classmethod. This migrates the cloudwatch scheme.

What

  • Add CloudWatchRemoteLogIO.from_config(), mirroring the legacy airflow_local_settings.py branch — parsing log_group_arn from the URL (with a clear ValueError when no ARN can be derived), merging [logging] remote_task_handler_kwargs IO-kwargs, and applying expanduser on base_log_folder, so behavior is unchanged for existing configs.
  • Register the cloudwatch scheme in the amazon provider.yaml remote-logging: section (with regenerated get_provider_info.py).
  • The legacy _default_conn_name_from(AwsLogsHook) side effect is intentionally not ported: per Decouple remote logging config from core #67056, provider dispatch produces no default conn id — the IO's hook reads [logging] remote_log_conn_id directly.

A sibling PR migrates the s3 scheme the same way; whichever merges second needs a trivial rebase of the new remote-logging: section. If from_config raises on a bad config, the shared factory falls back to the legacy path, so this is not a breaking change.


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

@jason810496 jason810496 self-assigned this Jul 13, 2026
Airflow resolves remote task log handlers through provider dispatch on
the remote_base_log_folder URL scheme since apache#67056; providers must
expose from_config so core and the Task SDK no longer depend on the
hardcoded branches in airflow_local_settings.py. This migrates the
cloudwatch scheme.
@jason810496 jason810496 force-pushed the feature/logging/cloudwatch-remote-log-io-from-config branch from 3bc65bd to be6fb4a Compare July 13, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant