Repository navigation
Conversation
AsyncKubernetesHook accepted config_file but never read it, so a deferrable task configured with an explicit kubeconfig authenticated against whatever the default location resolved to. Inside a single KubernetesJobTrigger the two hooks disagreed: the sync pod manager used the requested file while the async hook did not. Resolving config_file the way the sync hook does also brings it into the mutual-exclusion check, so combining it with in_cluster, kube_config or config_dict now fails instead of silently picking one.
Asserting on the hook's private cache flag only showed that a flag was left unset; it never showed that the kubeconfig is re-read on the next call, which is what a triggerer depends on when an exec plugin's token expires part-way through a job. Awaiting the load twice pins that directly and survives any change to how the caching is implemented. The other test's name described how many arguments it passes instead of what it checks.
|
Hello @rjgoyln - thank you for your contributions to Apache Airflow! The Airflow community has introduced a limit of 5 open pull requests at a time for contributors without write access to the repository. You currently have 24 open pull requests, so - as a one-time step of introducing the limit - we closed the ones where maintainers have not engaged yet:
These pull requests stay open because maintainers are already engaged in them - they count towards your limit:
This is not a judgement of you or of your changes. We never told contributors before that opening many pull requests at once was a problem, so there is nothing to feel bad about - and nothing is lost: your branches, commits and the review history stay where they are. What we ask you to do is to make your first prioritization decision: choose which of the pull requests above matter most to you, and reopen them (up to 5 open at a time, including the ones still open) with the "Reopen pull request" button or While your pull requests are waiting for review, the most valuable thing you can do is help in other ways - reviewing other contributors' pull requests, helping with issues, and taking part in the discussions on the devlist and Slack. Why we introduced the limit, what it means for you and how to reopen or restore a pull request is explained in https://github.com/apache/airflow/blob/main/contributing-docs/32_open_pull_request_limit.rst. Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting |
Summary
AsyncKubernetesHookstoresconfig_filebut never reads it, so a deferrable task pointed at an explicit kubeconfig still authenticates against whatever the default location resolves to, without warning. The two hooks inside oneKubernetesJobTriggertherefore disagree — the sync pod manager reads the requested file, the async one does not. It is now coalesced ahead of the connection'skube_config_path, as the sync hook has always done.With
KUBECONFIGandconfig_filenaming different clusters, the API server the hook ends up on:Behavior change
config_filenow counts towards the mutual-exclusion check, so combining it within_cluster,kube_configorconfig_dictraises instead of being silently ignored.Tests
test_load_config_with_several_paramsnever reached the mutual-exclusion check — the connection lookup raised first and satisfied its bareAirflowExceptionassertion.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5) following the guidelines