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

authn/k8schain : fallthrough in case of gcloud command not available #405

Merged
merged 1 commit into from
Mar 20, 2019

Conversation

vdemeester
Copy link
Contributor

@vdemeester vdemeester commented Mar 14, 2019

It's not the prettiest change ever, but it keeps the error in the general case, but allows to fallthrough in a multikeychain. This type of errors could be used for other chains too 👼

It fixes cases where using google.Keychain with authn.NewMultiKeychain where gcloud command is not available (see https://gist.github.com/vdemeester/c397ffb3fd19b4cc2ba3243dc4db9f83). It should use Anonymous instead of failing hard in that case.

Signed-off-by: Vincent Demeester [email protected]

@codecov-io
Copy link

codecov-io commented Mar 14, 2019

Codecov Report

Merging #405 into master will decrease coverage by 0.03%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #405      +/-   ##
==========================================
- Coverage   54.18%   54.14%   -0.04%     
==========================================
  Files          87       87              
  Lines        4108     4111       +3     
==========================================
  Hits         2226     2226              
- Misses       1542     1544       +2     
- Partials      340      341       +1
Impacted Files Coverage Δ
pkg/v1/google/auth.go 86.84% <0%> (-7.45%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 871d0d9...5253b29. Read the comment docs.

@jonjohnsonjr
Copy link
Collaborator

What does this fix?

@vdemeester
Copy link
Contributor Author

vdemeester commented Mar 14, 2019

@jonjohnsonjr I've updated the description (should also update the commit message I think) :

It fixes cases where using google.Keychain with authn.NewMultiKeychain where gcloud command is not available (see https://gist.github.com/vdemeester/c397ffb3fd19b4cc2ba3243dc4db9f83). It should use Anonymous instead of failing hard in that case.

pkg/v1/google/auth.go Outdated Show resolved Hide resolved
@vdemeester
Copy link
Contributor Author

@jonjohnsonjr updated 😉

pkg/v1/google/auth.go Outdated Show resolved Hide resolved
@vdemeester
Copy link
Contributor Author

@jonjohnsonjr updated 👼

Copy link
Collaborator

@jonjohnsonjr jonjohnsonjr left a comment

Choose a reason for hiding this comment

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

LGTM but to reiterate pipelines shouldn't be depending on google.Keychain, removing that code should be safe :)

@vdemeester
Copy link
Contributor Author

@jonjohnsonjr yes sir 🎖️ I'll update that on pipeline 😉

@jonjohnsonjr jonjohnsonjr merged commit 148cd17 into google:master Mar 20, 2019
@vdemeester vdemeester deleted the google-auth-no-fail branch March 20, 2019 16:33
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.

3 participants