Skip to content

Conversation

@CaptainCarpensir
Copy link
Contributor

Lets copilot fall back to default credentials when it fails to find/parse .aws/config file during copilot env init.

Addresses #5066

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.

@CaptainCarpensir CaptainCarpensir requested a review from a team as a code owner August 17, 2023 20:59
@CaptainCarpensir CaptainCarpensir requested review from iamhopaul123 and removed request for a team August 17, 2023 20:59
@github-actions
Copy link

github-actions bot commented Aug 17, 2023

🍕 Here are the new binary sizes!

Name New size (kiB) size (kiB) Delta (%)
macOS (amd) 51656 51488 +0.33
macOS (arm) 51860 51684 +0.34
linux (amd) 45476 45324 +0.34
linux (arm) 43712 43588 +0.28
windows (amd) 42280 42144 +0.32

@codecov-commenter
Copy link

Codecov Report

Merging #5202 (a37acbf) into mainline (86efee6) will increase coverage by 0.00%.
The diff coverage is 57.14%.

@@            Coverage Diff            @@
##           mainline    #5202   +/-   ##
=========================================
  Coverage     69.52%   69.52%           
=========================================
  Files           295      295           
  Lines         43897    43902    +5     
  Branches        285      285           
=========================================
+ Hits          30518    30523    +5     
  Misses        11889    11889           
  Partials       1490     1490           
Files Changed Coverage Δ
internal/pkg/cli/env_init.go 65.42% <57.14%> (+0.23%) ⬆️

errRetrieveCreds := err
sess, err := o.sessProvider.Default()
if err != nil {
return errors.Join(errRetrieveCreds, fmt.Errorf("falling back on default credentials: %w", err))
Copy link
Contributor

Choose a reason for hiding this comment

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

noice! It is a good call to include errRetrieveCreds in this case 👍🏼 !

Copy link
Contributor

@Lou1415926 Lou1415926 left a comment

Choose a reason for hiding this comment

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

:shipit:

@mergify mergify bot merged commit ce4e180 into aws:mainline Aug 21, 2023
@CaptainCarpensir CaptainCarpensir deleted the aiden/env-init-default-credentials branch September 14, 2023 18:28
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.

4 participants