-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reconnect on read_pods when k8s auth fails #32719
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
6ff196a
to
6c24452
Compare
6c24452
to
ab14463
Compare
55cb11c
to
7668657
Compare
@hussein-awala or @jedcunningham can I get CI approval to run the tests? I think I took some merges with the kubernetes cleanup and it caused some extra issues. I ran |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change could fix your issue, but it will impact the performance of the KP operator and hook. I need to check how the Kubernetes python client handle the ExecCredentials
and if there is another way or a a workaround to fix the issue without loading the client before each call. (for example through refresh_api_key_hook
parameter).
And if not, maybe we can add a new parameter for client reloading and set it to False
by default, and load the client only when it's True
, something like:
- @cached_property
+ @property
def get_conn:
- #prepare client
- return client
+ if reload_client or not self.__cached_client:
+ self.__cached_client: = #prepare client
+ self.__cached_client:
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
closes: #32718
I have a patch from my client that they use to reconnect pods with KPO in the case of an expiring token.
Opening this up as is and happy to discuss better ideas!
Essentially we want to reconnect/reauthenticate on read_pods as we found that when the token expires our tasks start getting 401 errors.