kubernetes module: catch TimeoutError and raise VelaKubernetesError#550
Open
boddumanohar wants to merge 2 commits intomainfrom
Open
kubernetes module: catch TimeoutError and raise VelaKubernetesError#550boddumanohar wants to merge 2 commits intomainfrom
boddumanohar wants to merge 2 commits intomainfrom
Conversation
499bdae to
bff440b
Compare
noctarius
requested changes
Jan 30, 2026
| ports = service.spec.ports | ||
| return ports[0].node_port if ports else None | ||
| except (VelaKubernetesError, AttributeError, IndexError): | ||
| except asyncio.TimeoutError as exc: |
Collaborator
There was a problem hiding this comment.
Wouldn't it make more sense to generally catch that as part of the Kubernetes client and wrap it into a VelaKubernetesError? I mean it is a Kubernetes error (from our perspective) if we can't reach k8s. Do we gain anything by gradually adding it to every single k8s API call, instead of catching it on a central location?
Member
Author
There was a problem hiding this comment.
That also works. made changes to kubernetes module and caught TimeoutError and raised VelaKubernetesError
Member
Author
|
Since the core logic of this PR is changed, I Updated the PR description and title. |
48d108c to
ae23941
Compare
ae23941 to
530e59c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
asyncio.TimeoutErrorthis seen quite commonly in the local development environment when a dummy kubeconfig file is used. So catching and logging it.We don't expect to see error in this prod, if we see it, then we are in problem. Hence logging it.Catch the TimeoutError and raise VelaKubernetesError