Skip to content
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

Parse Error 410 in kubernetes Watcher and return latest resource version #15418

Closed

Conversation

ephraimbuddy
Copy link
Contributor

@ephraimbuddy ephraimbuddy commented Apr 18, 2021

Currently, when kubernetes watcher stream encounter Error 410('too old resource version'),
it returns resource version '0' which is not the latest version.

This 410 error contains the latest resource version in its message.

This PR parses the message and return the latest resource version so that
watcher can continue watching instead of dieing

Some relevant links on this:
kubernetes-client/python#609
kubernetes-client/python#728 (comment)

This would likely fix some issues #14175, #13916, and #12644 (comment)


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@boring-cyborg boring-cyborg bot added provider:cncf-kubernetes Kubernetes provider related issues area:Scheduler including HA (high availability) scheduler labels Apr 18, 2021
@ephraimbuddy ephraimbuddy force-pushed the parse-watcher-stream-error branch 2 times, most recently from 4a96c1b to c62fe11 Compare April 19, 2021 14:18
Currently, when kubernetes watcher stream encounters Error 410('too old resource version'),
it returns resource version '0' which is not the latest version.

This 410 error contains the latest resource version in its message.

This PR parses the message and return the latest resource version so that
watcher can continue watching instead of returning '0'
@dimberman
Copy link
Contributor

@ephraimbuddy is there a case where we would get a 410 for a different reason? I feel hesitant to exactly parse an error in case the k8s folks change the wording.

@ephraimbuddy
Copy link
Contributor Author

@ephraimbuddy is there a case where we would get a 410 for a different reason? I feel hesitant to exactly parse an error in case the k8s folks change the wording.

Hi @dimberman , it's now being addressed here: #15500. The PR will close this one

@ephraimbuddy ephraimbuddy deleted the parse-watcher-stream-error branch June 9, 2021 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Scheduler including HA (high availability) scheduler provider:cncf-kubernetes Kubernetes provider related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants