Skip to content

Forward log_events_on_startup to the GKE and EKS deferrable pod triggers #75014

Open

Description

@shahar1

Description

#75013 adds log_events_on_startup to KubernetesPodOperator and KubernetesPodTrigger so users on large clusters can switch off the startup event watcher, which makes the API server read every event in the namespace on each poll.

The GKE and EKS operators inherit the synchronous path, so the parameter works there in sync mode. In deferrable mode it is lost:

  • GKEStartPodOperator.invoke_defer_method (providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py) builds GKEStartPodTrigger with an explicit kwarg list that does not include the flag, and GKEStartPodTrigger.serialize() re-lists its fields without it.
  • EksPodOperator.invoke_defer_method (providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py) builds EksPodTrigger the same way, and EksPodTrigger.__init__ has a fixed signature with no **kwargs.

KubernetesPodTrigger.serialize() therefore emits the key only when the flag is False, so neither subclass breaks, but GKEStartPodOperator(deferrable=True, log_events_on_startup=False) and the EKS equivalent still watch events in the triggerer. The provider docs (providers/cncf/kubernetes/docs/operators.rst, "Pod events in the task log") state this limitation.

Work needed

  1. Forward log_events_on_startup from both operators to their triggers.
  2. Accept and serialize it in EksPodTrigger and include it in GKEStartPodTrigger.serialize() (only when False, matching the base trigger).
  3. Raise the apache-airflow-providers-cncf-kubernetes minimum version in the google and amazon providers to the release that ships the parameter; the trigger __init__ of older cncf versions rejects the kwarg.
  4. Remove the limitation sentence from the cncf docs.

Acceptance criteria

  • GKEStartPodOperator(deferrable=True, log_events_on_startup=False) and EksPodOperator(deferrable=True, log_events_on_startup=False) create no event watch in the triggerer (unit test on each trigger's _wait_for_pod_start).
  • Default serialization of both triggers stays unchanged.

Related


Drafted-by: Claude Code (Fable 5.1) (no human review before posting)

Activity

  1. added
    provider:google
    provider:amazon
    kind:feature
    provider:cncf-kubernetes
    on Oct 18, 2026
  2. self-assigned this
    on Oct 18, 2026
  3. ameymhadgut commented on Oct 21, 2026

    @ameymhadgut

    Hi, I'd like to pick this up. I'll forward log_events_on_startup through EksPodOperator/GKEStartPodOperator defer paths into their triggers (init + serialize), with unit tests for both providers.

  4. shahar1 commented on Oct 22, 2026

    @shahar1
    ContributorAuthor

    4. Hi, I'd like to pick this up. I'll forward log_events_on_startup through EksPodOperator/GKEStartPodOperator defer paths into their triggers (init + serialize), with unit tests for both providers.

    Feel free to raise a PR

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

Metadata

Metadata

Assignees

Labels

area:providerskind:featureprovider:amazonprovider:cncf-kubernetesprovider:google

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions