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

Add a newline to pem blobs if one is not present #505

Merged
merged 2 commits into from
Apr 29, 2021

Conversation

rrichardson
Copy link
Contributor

/fixes #504

I'm not sure where is the best place to put this routine.
The function I chose isn't technically limited to loading PEM files, but it's currently not used for anything else.
It's the only place I found where we'd only have to invoke the routine once.

The only actual change is in src/config/utils.rs the rest are formatting changes.

…resent, this will make openssl a bit more forgiving for non-conforming pems
@kazk
Copy link
Member

kazk commented Apr 29, 2021

The only actual change is in src/config/utils.rs the rest are formatting changes.

@clux Looks like rustfmt job failed for some reason. https://github.com/clux/kube-rs/runs/2423729395

@clux
Copy link
Member

clux commented Apr 29, 2021

Thanks for this. Yeah, it looks sensible to me, though hope it doesn't come back to bite us due to windows line endings :D

I'd just drop the other fmt changes - if* it's not a problem. They are probably mismatching rustfmt versions (we use nightly fmt).

@rrichardson
Copy link
Contributor Author

rrichardson commented Apr 29, 2021

@clux - Those were formatted with cargo +nightly fmt
I can't really explain the difference. I don't think there is a way to globally override the formatting.. ?

Either way, I'll look at the rustfmt CI job discrepancies and make it work.

@kazk
Copy link
Member

kazk commented Apr 29, 2021

@rrichardson

Removing other files from the PR like the following should be enough?

git reset HEAD~
git add kube/src/config/utils.rs
git restore . # restore other files
git commit
git push --force-with-lease

Other files should be formatted by GitHub Actions after merging. The rustfmt job failed last time for unknown reason.

@clux clux merged commit 80ea40a into kube-rs:master Apr 29, 2021
@kazk
Copy link
Member

kazk commented Apr 29, 2021

Other files should be formatted by GitHub Actions after merging.

I thought I had seen GitHub Action formatting code and pushing commit when necessary, but I guess I misremembered (maybe it was from other repo).

@clux
Copy link
Member

clux commented Apr 30, 2021

If it's possible to do that, then that's great. Usually I have been doing a quick make fmt && git ci -m fmt after commits (since github stuff doesn't run on forks).

Turns out the stray formatting issues in there was my fault - had merged some prs and forgotten to do it.

@clux
Copy link
Member

clux commented May 15, 2021

Released in 0.53.0. Thanks again.

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.

Loading Kubeconfig fails if it contains pems with no trailing newline
3 participants