Skip to content

Prevent nil pointer dereference#3594

Closed
dgageot wants to merge 1 commit intoGoogleContainerTools:masterfrom
dgageot:prevent-nil-pointer-dereference
Closed

Prevent nil pointer dereference#3594
dgageot wants to merge 1 commit intoGoogleContainerTools:masterfrom
dgageot:prevent-nil-pointer-dereference

Conversation

@dgageot
Copy link
Copy Markdown
Contributor

@dgageot dgageot commented Jan 27, 2020

Not sure how this can happen but this has happened.

I will try to reproduce and add tests around that code.

Signed-off-by: David Gageot david@gageot.net

Signed-off-by: David Gageot <david@gageot.net>
Copy link
Copy Markdown
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

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

I think the NewGcloudAuthenticator error handling (the lack of it) is adding to the problem. In L87 we might fail with an error, then go to defaultkeychain which then returns nil ...
Let's reproduce the issue and understand it deeper.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 27, 2020

Codecov Report

Merging #3594 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted Files Coverage Δ
pkg/skaffold/docker/authenticators.go 65.51% <0%> (ø) ⬆️
...affold/kubernetes/portforward/kubectl_forwarder.go 65.85% <0%> (-2.44%) ⬇️

@dgageot
Copy link
Copy Markdown
Contributor Author

dgageot commented Jan 27, 2020

@balopat yes, you're right.

@dgageot
Copy link
Copy Markdown
Contributor Author

dgageot commented Jan 28, 2020

Closing in favour of #3597

@dgageot dgageot closed this Jan 28, 2020
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.

3 participants