Skip to content

Conversation

@boddumanohar
Copy link
Member

@boddumanohar boddumanohar commented Jan 30, 2026

asyncio.TimeoutError this 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

@boddumanohar boddumanohar requested review from mxsrc and noctarius and removed request for mxsrc January 30, 2026 06:14
@boddumanohar boddumanohar requested a review from mxsrc January 30, 2026 06:16
ports = service.spec.ports
return ports[0].node_port if ports else None
except (VelaKubernetesError, AttributeError, IndexError):
except asyncio.TimeoutError as exc:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That also works. made changes to kubernetes module and caught TimeoutError and raised VelaKubernetesError

@boddumanohar boddumanohar changed the title catch log TimeoutError in branch list api kubernetes module: catch TimeoutError and raise VelaKubernetesError Jan 30, 2026
@boddumanohar
Copy link
Member Author

Since the core logic of this PR is changed, I Updated the PR description and title.

kubernetes module: catch TimeoutError and raise VelaKubernetesError

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants