Add CloudWatchRemoteLogIO.from_config and register cloudwatch scheme#69816
Draft
jason810496 wants to merge 1 commit into
Draft
Add CloudWatchRemoteLogIO.from_config and register cloudwatch scheme#69816jason810496 wants to merge 1 commit into
jason810496 wants to merge 1 commit into
Conversation
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.
3bc65bd to
be6fb4a
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.
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_folderURL scheme, instantiating the provider class through a no-argfrom_config()classmethod. This migrates thecloudwatchscheme.What
CloudWatchRemoteLogIO.from_config(), mirroring the legacyairflow_local_settings.pybranch — parsinglog_group_arnfrom the URL (with a clearValueErrorwhen no ARN can be derived), merging[logging] remote_task_handler_kwargsIO-kwargs, and applyingexpanduseronbase_log_folder, so behavior is unchanged for existing configs.cloudwatchscheme in the amazonprovider.yamlremote-logging:section (with regeneratedget_provider_info.py)._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_iddirectly.A sibling PR migrates the
s3scheme the same way; whichever merges second needs a trivial rebase of the newremote-logging:section. Iffrom_configraises 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?