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

chore(cli): add S3 bucket object tree to svc show #4966

Merged
merged 16 commits into from
Jun 12, 2023

Conversation

huanjani
Copy link
Contributor

@huanjani huanjani commented Jun 7, 2023

sample output:

% copilot svc show 
Service name: static-site
About

  Application  bugbash-static
  Name         static-site
  Type         Static Site

Routes

  Environment  URL
  -----------  ---
  test         d1vwytbnh1k1gy.cloudfront.net
  prod         d1yb44q5409rdj.cloudfront.net

S3 Bucket Objects

  Environment  test
.
├── error.html
├── index.html
├── css
│   ├── Style.css
│   ├── all.min.css
│   └── bootstrap.min.css
└── images
    ├── bg-masthead.jpg
    └── new
        └── hi.html

  Environment  prod
.
├── ReadMe.md
├── error.html
├── index.html
├── Images
│   ├── AWS-free.PNG
│   ├── S3WebsiteHosting-Architecture.PNG
│   ├── SampleWebsite.PNG
│   ├── Step1-CreateBucket-B.PNG
│   ├── Step1-CreateBucket-C.PNG
│   ├── Step1-CreateBucket-D.PNG
│   ├── Step1-CreateBucket-E.PNG
│   ├── Step1-CreateBucket.PNG
│   ├── Step2-UploadContents.PNG
│   ├── Step3-BucketPolicy-A.PNG
│   ├── Step3-BucketPolicy-B.PNG
│   ├── Step3-BucketPolicy.PNG
│   ├── Step4-A.PNG
│   └── Step4-B.PNG
├── css
│   ├── Style.css
│   ├── all.min.css
│   └── bootstrap.min.css
└── images
    ├── bg-masthead.jpg
    └── new
        └── hi.html

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

@huanjani huanjani requested a review from a team as a code owner June 7, 2023 21:28
@huanjani huanjani requested review from Varun359 and removed request for a team June 7, 2023 21:28
@github-actions
Copy link

github-actions bot commented Jun 7, 2023

🍕 Here are the new binary sizes!

Name New size (kiB) size (kiB) Delta (%)
macOS (amd) 50828 50748 +0.16
macOS (arm) 51032 50952 +0.16
linux (amd) 44744 44676 +0.15
linux (arm) 43076 43012 +0.15
windows (amd) 41608 41548 +0.14

@codecov-commenter
Copy link

codecov-commenter commented Jun 7, 2023

Codecov Report

Merging #4966 (07676b3) into mainline (d79a46d) will increase coverage by 0.00%.
The diff coverage is 74.31%.

@@            Coverage Diff             @@
##           mainline    #4966    +/-   ##
==========================================
  Coverage     70.15%   70.15%            
==========================================
  Files           289      289            
  Lines         41693    41797   +104     
  Branches        285      285            
==========================================
+ Hits          29248    29324    +76     
- Misses        11038    11060    +22     
- Partials       1407     1413     +6     
Impacted Files Coverage Δ
internal/pkg/describe/service.go 87.01% <ø> (ø)
internal/pkg/describe/static_site.go 60.78% <50.00%> (-3.57%) ⬇️
internal/pkg/aws/s3/s3.go 91.32% <87.32%> (-2.14%) ⬇️

Copy link
Contributor

@iamhopaul123 iamhopaul123 left a comment

Choose a reason for hiding this comment

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

LGTM overall especially the example included in the description!

internal/pkg/aws/s3/s3.go Outdated Show resolved Hide resolved
internal/pkg/aws/s3/s3.go Outdated Show resolved Hide resolved
internal/pkg/aws/s3/s3.go Outdated Show resolved Hide resolved
internal/pkg/aws/s3/s3.go Outdated Show resolved Hide resolved
internal/pkg/aws/s3/s3.go Show resolved Hide resolved
internal/pkg/aws/s3/s3.go Show resolved Hide resolved
internal/pkg/aws/s3/s3.go Outdated Show resolved Hide resolved
internal/pkg/aws/s3/s3.go Outdated Show resolved Hide resolved
Copy link
Contributor

@iamhopaul123 iamhopaul123 left a comment

Choose a reason for hiding this comment

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

LGTM overall especially the example included in the description!

internal/pkg/aws/s3/s3.go Outdated Show resolved Hide resolved
internal/pkg/aws/s3/s3.go Outdated Show resolved Hide resolved
internal/pkg/aws/s3/s3.go Show resolved Hide resolved
internal/pkg/aws/s3/s3.go Outdated Show resolved Hide resolved
@iamhopaul123 iamhopaul123 removed the request for review from Varun359 June 8, 2023 21:22
Copy link
Contributor

@iamhopaul123 iamhopaul123 left a comment

Choose a reason for hiding this comment

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

Awesome!

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.

Looks great!! I just have two more questions 🥺 mostly the env manager role session and whether we should let the users know that there is no file in an env instead of not showing the env at all!

listResp := &s3.ListObjectsV2Output{}
var err error
for _, prefix := range prefixes {
var respContents []*s3.Object
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like we can look to parallelize these calls in the future!

internal/pkg/describe/static_site.go Outdated Show resolved Hide resolved
internal/pkg/describe/static_site.go Outdated Show resolved Hide resolved
internal/pkg/describe/static_site.go Show resolved Hide resolved
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.

Looks great! Approving with a label but feel free to remove it whenever you're raedy!

internal/pkg/describe/service.go Outdated Show resolved Hide resolved
@Lou1415926 Lou1415926 added the do-not-merge Pull requests that mergify shouldn't merge until the requester allows it. label Jun 12, 2023
@huanjani huanjani removed the do-not-merge Pull requests that mergify shouldn't merge until the requester allows it. label Jun 12, 2023
@mergify mergify bot merged commit 8e41bea into aws:mainline Jun 12, 2023
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