Skip to content

Better logging for Kube pod failures #144

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

Merged
merged 12 commits into from
Jun 17, 2022
Merged

Better logging for Kube pod failures #144

merged 12 commits into from
Jun 17, 2022

Conversation

thedanvail
Copy link
Contributor

  • Handles the error more gracefully if we receive from Kube's API when trying to spin up a pod
  • Updated CHANGELOG with new changes

@thedanvail
Copy link
Contributor Author

thedanvail commented Jun 13, 2022

Hopefully this is the functionality that was requested from #110 - if not, can still make changes. Thought about using Result and/or adding onto error.rs, but neither seemed to quite fit the bill for this in my opinion.

Copy link
Member

@aviramha aviramha left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! See comments inline.

@thedanvail
Copy link
Contributor Author

All right, I've switched over to using anyhow for attaching context to these errors. I'm signing off for the night, but should any additional changes be needed, please do not hesitate to let me know and I'll get on them tomorrow evening or possibly Wednesday.

@thedanvail
Copy link
Contributor Author

I see some checks failed, I'll look at those in the morning

@aviramha
Copy link
Member

LGTM, @meowjesty can you review this please?

@aviramha aviramha requested a review from meowjesty June 14, 2022 10:32
Copy link
Member

@meowjesty meowjesty left a comment

Choose a reason for hiding this comment

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

Hey Dan, thanks for the help in improving this! The lack of context kinda tripped me over a few times.

My main suggestion comes in the form that we probably don't need to have a Result here, as we just crash when this fails anyway. Just change some of the unwraps into expects (also no need to change every single one).

Edit: Outdated, please ignore this (my bad)!

Copy link
Member

@aviramha aviramha left a comment

Choose a reason for hiding this comment

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

Last change and we can merge it :)

- Moved the CHANGELOG line to the `unreleased` section
- Added `?` in `pod_api.rs` to potentially return an error
@aviramha
Copy link
Member

Great, can you merge main into your branch so tests will run before merging?
Thanks!

@thedanvail
Copy link
Contributor Author

Working on fixing the tests

@eyalb181
Copy link
Member

Tests are passing, the e2e are just a bit flaky at the moment (need to look into it). Merging to main, thanks again @thedanvail !

@eyalb181 eyalb181 merged commit c33e8e4 into metalbear-co:main Jun 17, 2022
@thedanvail thedanvail deleted the kube-pod-error branch June 17, 2022 14:04
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.

4 participants