swiftkube / client

Swift client for Kubernetes
Apache License 2.0
129 stars 20 forks source link

Add option to retrieve logs without watching #14

Closed thomashorrobin closed 2 years ago

thomashorrobin commented 2 years ago

This adds a parallel way to get logs other than the current follow logs option. It uses the same path to query the api but without the follow=true option This returns the logs as plane text so a number of functions have been duplicated to handle this

thomashorrobin commented 2 years ago

I'm open here to an alternative approach to making some of the functions more generic. Essentially I've duplicated a lot of functionality to be able to handle the Content-Type: text/html response from the API

thomashorrobin commented 2 years ago

@iabudiab I'm having issues with the linter here. I run it locally and it's fine but the GitHub action has different behaviour. Do you have any idea why this may be?

iabudiab commented 2 years ago

@thomashorrobin Hey there, thank you for the PR and I'm really sorry for not responding earlier. The last couple of months I was much busier that usual. I'll take a look at the PR and that linter problem and get back to you ;)

iabudiab commented 2 years ago

Running swift format against the code in the PR doesn't pass locally, which would explain why it fails in the CI. How are you running it on your end?

iabudiab commented 2 years ago

I think I know why the linter passes locally on your side but fails in the CI. I could reproduce it with an older version of swiftformat. Try to update swiftformat to the latest version.

thomashorrobin commented 2 years ago

I think I know why the linter passes locally on your side but fails in the CI. I could reproduce it with an older version of swiftformat. Try to update swiftformat to the latest version.

Goodnews! This was the issue! Sorry about that, I should have thought of it myself

Will take a look at the rest later tonight and might rebase onto your latest changes