Conversation
|
ping @stobrien89 (follow up on #2516) |
stobrien89
left a comment
There was a problem hiding this comment.
Hi @tchernomax,
Thanks for the follow-up. Good catch- this change makes sense to me. We'd be glad to accept this, but will need the failing test to be adjusted to account for the new (correct) behavior. You're welcome to do this. Otherwise, we should be able to carve out some time to address this next week. Thanks!
1d6f998 to
11497f2
Compare
In fact I realize the same code handle the I changed my commit adding check to see if the file is I think the tests should be ok now (I didn't run them locally), can you relaunch the CI ? Thanks |
| # prefix with 'profile ' | ||
| if ($filename == (self::getHomeDir() . '/.aws/config') && | ||
| $sourceProfileName != 'default') { | ||
| $sourceProfileName = 'profile ' . $sourceProfileName; |
There was a problem hiding this comment.
Would you please be able to add a check here for whether profile has been already appended to the profile. By doing this we keep backward compatibility for customers that are already adding the profile to profile names.
| $sourceProfileName = $roleProfile['source_profile']; | ||
| # in ~/.aws/config all the named profile (except 'default') are | ||
| # prefix with 'profile ' | ||
| if ($filename == (self::getHomeDir() . '/.aws/config') && |
There was a problem hiding this comment.
Can you please remove the condition $filename == (self::getHomeDir() . '/.aws/config') since I do no think is needed. You can leave the other condition $sourceProfileName != 'default'.
"$profiles" keys are prefix with "profile ", but source_profile attribute isn't so the SDK never found the source_profile.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
how to reproduce
~/.aws/config
test.php
result: fail
expected result: ok
But if you use this ~/.aws/config (which is ill formatted according to the doc), it works:
note
follow #2516 , which is already closed