Skip to content
This repository was archived by the owner on Jun 22, 2026. It is now read-only.

chore: allow copilot env init fallback to default credentials - #5202

Merged
mergify[bot] merged 3 commits into
aws:mainlinefrom
CaptainCarpensir:aiden/env-init-default-credentials
Aug 21, 2023
Merged

mergify[bot] merged 3 commits into
aws:mainlinefrom
CaptainCarpensir:aiden/env-init-default-credentials

Conversation

@CaptainCarpensir

Copy link
Copy Markdown
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

github-actions Bot commented Aug 17, 2023 •

Copy link
Copy Markdown

🍕 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
Copy Markdown

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%) ⬆️

Comment thread internal/pkg/cli/env_init.go Resolved
Comment thread internal/pkg/cli/env_init_test.go Resolved
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
Copy Markdown
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 👍🏼 !

Comment thread internal/pkg/cli/env_init_test.go Resolved

@Lou1415926 Lou1415926 left a comment

Copy link
Copy Markdown
Contributor

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants