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

fix(k8s): handle status of deleted Pod correctly #1084

Merged
merged 1 commit into from May 6, 2022

Conversation

dnwe
Copy link
Contributor

@dnwe dnwe commented May 6, 2022

Whilst deleting a kernel namespace returns a v1.Status, deleting a Pod
will return a v1.Pod and its status field is a v1.PodStatus, not a
string.

The existing code currently raises an exception as it attempts to do an
'in' check against the V1PodStatus type rather than a string as it
expected. This is logged as:

Error occurred deleting pod: argument of type 'V1PodStatus' is not iterable

Whilst deleting a kernel namespace returns a v1.Status, deleting a Pod
will return a v1.Pod and its status field is a v1.PodStatus, not a
string.

The existing code currently raises an exception as it attempts to do an
'in' check against the V1PodStatus type rather than a string as it
expected. This is logged as:
> Error occurred deleting pod: argument of type 'V1PodStatus' is not iterable
@welcome
Copy link

welcome bot commented May 6, 2022

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

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

These changes look great @dnwe - thank you for cleaning up this area.

@kevin-bates kevin-bates merged commit 7e99cb6 into jupyter-server:main May 6, 2022
@welcome
Copy link

welcome bot commented May 6, 2022

Congrats on your first merged pull request in this project! 🎉
congrats
Thank you for contributing, we are very proud of you! ❤️

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

Successfully merging this pull request may close these issues.

None yet

2 participants