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

Fix issue #60: keyFile in config (#60) #61

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ralfiannor
Copy link

Fix logic if keyFile is null

Fix logic if keyFile is null
@ralfiannor ralfiannor changed the title Bug Fix #60 Fix issue #60: keyFile in config (#59) Apr 25, 2019
@ralfiannor ralfiannor changed the title Fix issue #60: keyFile in config (#59) Fix issue #60: keyFile in config (#60) Apr 25, 2019
return new StorageClient([
'projectId' => $config['project_id'],
'keyFilePath' => $keyFile,
'keyFile' => array_merge(["project_id" => $config['project_id']], $keyFile)
Copy link

Choose a reason for hiding this comment

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

we can actually skip this whole is_array check entirely and just remove the array_merge. The key file should already contain project_id, so I'm not sure why it needs to be merged in the first place?

@phroggyy
Copy link

phroggyy commented May 9, 2019

@nicja thoughts on trying to get some tests in here? I'm wondering if @ralfiannor should perhaps at least add a test for the config merging, but that would require some setup on your side to get a pipeline running.

@iansltx
Copy link

iansltx commented Aug 8, 2019

Confirmed that this fix works for a GKE-powered environment with creds provided at the instance level. Had the same issue mentioned in #68. I'll fork off of this branch and a test that fails prior to this commit and succeeds with the commit if that's what it takes to get this merged.

@trovster
Copy link

If this fixes #60, then please could it be merged in? cc @nikolaos-spyratos, @alihen

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.

None yet

5 participants