Skip to content

Provider migration for decoupling remote logging from core #70265

Closed
7 of 7 issues completed
Closed

Description

@jason810496

Why

#67056 decoupled remote logging from the hardcoded if/elif chain in
airflow-core/src/airflow/config_templates/airflow_local_settings.py. Core and the Task SDK now
share one resolver (airflow_shared.logging.factory.resolve_remote_task_log) that dispatches on the
URL scheme of [logging] remote_base_log_folder via ProvidersManager and instantiates the
provider class through a no-arg from_config() classmethod.

The legacy per-scheme chain in airflow_local_settings.py is transitional: it stays as a fallback
until every remote logging backend has been migrated to the new mechanism. This issue tracks that
migration, one sub-issue per backend.

The pattern

Each migration is a small, self-contained PR with three parts (see the merged amazon examples:
s3 — #69817, cloudwatch — #69816):

  1. Add from_config() — a no-arg classmethod on the provider's RemoteLogIO class that mirrors
    the corresponding legacy branch in airflow_local_settings.py, including the
    [logging] remote_task_handler_kwargs IO-kwargs merge (where the legacy branch applies it) and
    expanduser on base_log_folder, so behavior is unchanged for existing configs.

  2. Register the scheme — add a remote-logging: section to the provider's provider.yaml and
    mirror it in get_provider_info.py:

    remote-logging:
      - classpath: airflow.providers.amazon.aws.log.s3_task_handler.S3RemoteLogIO
        scheme: s3
  3. Tests — mirror TestS3RemoteLogIOFromConfig in
    providers/amazon/tests/unit/amazon/aws/log/test_s3_task_handler.py: from_config field mapping,
    IO-kwargs filtering, scheme registration, and end-to-end resolve_remote_task_log dispatch.

  4. Real system test — set up the actual backend yourself (a real service or a local
    equivalent), run a task with remote logging enabled, and verify logs are uploaded and read back
    through the new dispatch path. Include the setup and verification results in the PR description.

If from_config() raises on a bad config, the shared factory falls back to the legacy path — so
these migrations are non-breaking by construction.

Backends

Follow-up once backends are migrated

  • Once all provider migrations are merged and released, add a deprecation warning to the
    legacy branches in airflow_local_settings.py, gated on the provider versions that ship
    from_config (step 2 of the plan in Decouple remote logging config from core #67056).
  • Remove the hardcoded remote logging config from core in a future minor or major release,
    whichever the community prefers.

How to contribute

Comment on a sub-issue to claim it — one PR per scheme, following the merged amazon examples.
The elasticsearch and opensearch sub-issues include a small design decision (those backends are
currently selected by host config rather than URL scheme); design feedback is welcome there.

Sub-issues

Sub-issues

7 of 7 Issues completed
Loading 7 sub-issues

Activity

  1. added
    kind:meta
    on Jul 23, 2026
  2. FrankYang0529 commented on Jul 23, 2026

    @FrankYang0529
    Member

    I would like to try #70272. Thank you.

  3. aaron-y-chen commented on Jul 23, 2026

    @aaron-y-chen
    Contributor

    Hi, I can work on #70266 and #70267. I have a GCP account that I can use for e2e verification.

  4. jason810496 commented on Jul 23, 2026

    @jason810496
    MemberAuthor

    Hi @FrankYang0529, @nailo2c,

    Would you mind to comment again at each sub-issues? Just in case someone comes across the sub-issue but doesn't take a look at this meta issue.

    Thanks!

  5. Andrushika commented on Jul 23, 2026

    @Andrushika
    Contributor

    Hi, I would like to take #70268, already commented in that issue. Thanks!

  6. Prab-27 commented on Jul 23, 2026

    @Prab-27
    Contributor

    I'd like to work on #70269, commented on it , Thanks !

  7. Vamsi-klu commented on Jul 23, 2026

    @Vamsi-klu
  8. baha-bouali commented on Aug 10, 2026

    @baha-bouali
    Contributor

    Hey @jason810496!

    I'd like to take on the first follow-up task, which is adding deprecation warnings to the legacy
    branches in airflow_local_settings.py.

    Now that all 9 backends are merged, my proposed approach will be: a small helper that emits RemovedInAirflow4Warning at the top of each of the 7 elif remote_base_log_folder.startswith(...) branches (s3, cloudwatch, gs, wasb, stackdriver, oss, hdfs)

    2 things I'd like to confirm before making my PR:

    1. Should the warning fire unconditionally whenever the branch executes (simpler, message just
      tells the user to check their provider version), or should it check the installed provider
      version via importlib.metadata and only warn if that version already ships from_config
      (avoids telling someone to "upgrade" when they're already on a new-enough version and
      something else is actually wrong)?

    2. elasticsearch/opensearch are gated on ELASTICSEARCH_HOST/OPENSEARCH_HOST rather than
      URL scheme, so they don't fit this pattern the same way.

      Thus, I'd propose covering just the 7 scheme-based backends here and leaving ES/OpenSearch for a separate follow-up once their dispatch design is settled, unless there's a preference for me to look at those too.

    Happy to open a draft PR once there's rough agreement on the above.

  9. jason810496 commented on Aug 11, 2026

    @jason810496
    MemberAuthor

    Hi @baha-bouali ,
    I prefer to wait until all those providers be released than add the warning. So that the warning can include the version with provider manager integration supported. Regarding the ES and OS the warning message can contain the next step to configure the compatible upgrade. There isn't much difference even the existing gate check against the ELASTICSEARCH_HOST.

  10. baha-bouali commented on Aug 24, 2026

    @baha-bouali
    Contributor

    I prefer to wait until all those providers be released than add the warning

    Hey @jason810496.
    All 9 backends are now confirmed released, verified at three levels (not just version numbers):

    scheme package PR shipped in
    s3, cloudwatch amazon #69817, #69816 9.33.0
    gs google #70504 22.3.0
    stackdriver google #66513 22.1.0
    wasb microsoft-azure #70301 14.1.0
    oss alibaba #70682 3.4.0
    hdfs apache-hdfs #71278 4.13.0
    elasticsearch elasticsearch #70525 6.9.0
    opensearch opensearch #70295 1.12.0

    For each: confirmed from_config is present in the actual shipped wheel, confirmed the
    changelog names that exact PR under that exact version, and confirmed that version is a real upload on PyPI.

    Ready to start on the deprecation-warning follow-up whenever you'd like me to proceed.

  11. jason810496 commented on Sep 8, 2026

    @jason810496
    MemberAuthor

    Hey @jason810496.
    All 9 backends are now confirmed released, verified at three levels (not just version numbers):

    Sorry for the late reply. Yes, please feel free to raise the PR and tag me to review there.

  12. kaxil commented on Oct 1, 2026

    @kaxil
    Member

    All the items tracked here are now closed or merged. Can this be closed, or is there remaining work it should track?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:loggingarea:providerskind:metaon hold

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions