-
Notifications
You must be signed in to change notification settings - Fork 428
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
feat(cli): display secrets as subcategory in svc_show
#1704
Conversation
svc_show
svc_show
Ex:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good!
webSvcSecrets, err := d.svcDescriber[env].Secrets() | ||
if err != nil { | ||
return nil, fmt.Errorf("retrieve secrets: %w", err) | ||
} | ||
secrets = append(secrets, flattenSecrets(env, webSvcSecrets)...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should think about how we can remove this duplication across workload types the same code seems to be repeated for both LB Web Services and Backend Services
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And for jobs, eventually, too. Can we leave this refactor for next time?
With
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! just some small feedback, feel free to remove "do-not-merge" after addressing :)
…mes, use underline method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Agree on "we should try to reduce the code duplication".
Author: penghaoh <[email protected]> Date: 2020-11-30T22:14:28.000Z Address feedback commit c09bbba6bd10d646417510d998451a1f2e141bbe Author: penghaoh <[email protected]> Date: 2020-11-23T23:23:21.000Z chore: add boilerplate for copilot exec cr https://code.amazon.com/reviews/CR-39357784 commit 46a0f2bea06e6436e1ecf333546f5a3fa50411e2 Author: penghaoh <[email protected]> Date: 2020-11-23T20:14:22.000Z chore: add custom aws-sdk-go for ECS cr https://code.amazon.com/reviews/CR-39348057 commit 25be354 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: 2020-11-30T17:07:40.000Z chore: Bump github.com/briandowns/spinner from 1.11.1 to 1.12.0 (aws#1729) Bumps [github.com/briandowns/spinner](https://github.com/briandowns/spinner) from 1.11.1 to 1.12.0. - [Release notes](https://github.com/briandowns/spinner/releases) - [Commits](briandowns/spinner@v1.11.1...v1.12) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> commit ef735c9 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: 2020-11-30T17:02:37.000Z chore: Bump github.com/aws/aws-sdk-go from 1.35.33 to 1.35.35 (aws#1730) Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.35.33 to 1.35.35. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md) - [Commits](aws/aws-sdk-go@v1.35.33...v1.35.35) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit ce836bd Author: Janice Huang <[email protected]> Date: 2020-11-24T22:43:38.000Z chore(cli): make the dashes under column headings consistent (aws#1705) Wherever command output is in tabular format, this brings consistency to our formatting-- dashes (same length as heading, not longest element) below the headings. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. commit 6128e9c Author: Janice Huang <[email protected]> Date: 2020-11-24T20:22:47.000Z feat(cli): display secrets as subcategory in `svc_show` (aws#1704) This change displays secrets as a separate category (not within "Variables") in `svc show`. If the secret value comes from Parameter Store, it is preceded by `parameter/`. Otherwise, if it comes from Secrets Manager, it is displayed as an ARN. Addresses aws#720 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. commit 42567bf Author: Efe Karakus <[email protected]> Date: 2020-11-23T21:39:32.000Z docs(README): remove preview program description (aws#1722) _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
* chore: add custom aws-sdk-go for ECS cr https://code.amazon.com/reviews/CR-39348057 * commit e19046ca2668f00fdbd4d328d86ef2b9e576b9d5 Author: penghaoh <[email protected]> Date: 2020-11-30T22:14:28.000Z Address feedback commit c09bbba6bd10d646417510d998451a1f2e141bbe Author: penghaoh <[email protected]> Date: 2020-11-23T23:23:21.000Z chore: add boilerplate for copilot exec cr https://code.amazon.com/reviews/CR-39357784 commit 46a0f2bea06e6436e1ecf333546f5a3fa50411e2 Author: penghaoh <[email protected]> Date: 2020-11-23T20:14:22.000Z chore: add custom aws-sdk-go for ECS cr https://code.amazon.com/reviews/CR-39348057 commit 25be354 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: 2020-11-30T17:07:40.000Z chore: Bump github.com/briandowns/spinner from 1.11.1 to 1.12.0 (#1729) Bumps [github.com/briandowns/spinner](https://github.com/briandowns/spinner) from 1.11.1 to 1.12.0. - [Release notes](https://github.com/briandowns/spinner/releases) - [Commits](briandowns/spinner@v1.11.1...v1.12) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> commit ef735c9 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: 2020-11-30T17:02:37.000Z chore: Bump github.com/aws/aws-sdk-go from 1.35.33 to 1.35.35 (#1730) Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.35.33 to 1.35.35. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md) - [Commits](aws/aws-sdk-go@v1.35.33...v1.35.35) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit ce836bd Author: Janice Huang <[email protected]> Date: 2020-11-24T22:43:38.000Z chore(cli): make the dashes under column headings consistent (#1705) Wherever command output is in tabular format, this brings consistency to our formatting-- dashes (same length as heading, not longest element) below the headings. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. commit 6128e9c Author: Janice Huang <[email protected]> Date: 2020-11-24T20:22:47.000Z feat(cli): display secrets as subcategory in `svc_show` (#1704) This change displays secrets as a separate category (not within "Variables") in `svc show`. If the secret value comes from Parameter Store, it is preceded by `parameter/`. Otherwise, if it comes from Secrets Manager, it is displayed as an ARN. Addresses #720 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. commit 42567bf Author: Efe Karakus <[email protected]> Date: 2020-11-23T21:39:32.000Z docs(README): remove preview program description (#1722) _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ * chore(cli): boilerplate for svc/job/task exec cr https://code.amazon.com/reviews/CR-39984997 * Address feedback and add --cluster flag to task exec * chore(cli): add validate and ask for svc exec cr https://code.amazon.com/reviews/CR-40079015 * chore(cli): implement svc exec Execute() cr https://code.amazon.com/reviews/CR-40177002 * Address comment * chore(ecs): implement ExecuteCommand API cr https://code.amazon.com/reviews/CR-40448327 * Remove log in ecs pkg * Add log prompting users to delete the orphan session * Remove ErrExecuteCommand * chore(exec): implement StartSession for OS cr https://code.amazon.com/reviews/CR-40615982 * Use http/Get to download the binary instead of curl to local * Move ssm plugin validate to cli pkg * chore(ecs): remove terminate session call in ExecuteCommand cr https://code.amazon.com/reviews/CR-40863766 * chore(exec): add plugin management for non macos platforms cr https://code.amazon.com/reviews/CR-40966835 * chore: use gamma endpoint for ECS and RGTA client * Avoid outputting when validating ssm plugin on windows * Update frontend model * Address feedback * Address feedback * chore(exec): apply interactive run to start session cr https://code.amazon.com/reviews/CR-41395554 * chore(manifest): add exec field to the manifest cr https://code.amazon.com/reviews/CR-41475925 * chore(stack): update stack pkg and CFN template for services and environment cr https://code.amazon.com/reviews/CR-41546916 * Address iyerv@ feedback * Rename exec to executeCommand and use go template instead of CFN param * chore(cli): remove interactive flag and job exec cr https://code.amazon.com/reviews/CR-41851301 * chore(cli): add task exec validate cr https://code.amazon.com/reviews/CR-41860865 * chore(cli): add ssm plugin validation for task exec cr https://code.amazon.com/reviews/CR-41862462 * chore(selector): add running tasks selector (#1792) <!-- Provide summary of changes --> Add `RunningTask()` to `selector` pkg, allowing to select a running copilot task. <!-- Issue number, if available. E.g. "Fixes #31", "Addresses #42, 77" --> By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. * Resolve merging conflict cr https://code.amazon.com/reviews/CR-41929264 * chore(cli): add Ask() for task exec cr https://code.amazon.com/reviews/CR-41994838 * Fix prompt text cr https://code.amazon.com/reviews/CR-42292095 * Address feedback * chore(templates): add resource comments to v1.2.0 env template * chore(cli): implement Execute() for task exec cr https://code.amazon.com/reviews/CR-42377497 * chore: enable execute-command for task run cr https://code.amazon.com/reviews/CR-42467741 * chore(cli): remove exec related unused code cr https://code.amazon.com/reviews/CR-42531908 * docs: add docs for svc/task exec cr https://code.amazon.com/reviews/CR-42539124 * Address feedback * chore(cli): task exec should be able to use --default in workspace cr https://code.amazon.com/reviews/CR-43124690 * chore(env): update v1.2.0 env template cr https://code.amazon.com/reviews/CR-43574909 * chore(doc): add info for svc-exec cr https://code.amazon.com/reviews/CR-43631507 * chore: fix template bugs and remove gamma endpoint usage cr https://code.amazon.com/reviews/CR-43826647 * Address feedback * Update the doc * chore(task): add default task role for exec cr https://code.amazon.com/reviews/CR-43838665 * Update task exec doc * chore(exec): enable svc exec by default cr https://code.amazon.com/reviews/CR-43849472 * Change execute_command default to false * chore(exec): task exec only lists one-off task cr https://code.amazon.com/reviews/CR-43918751 * chore: fix ubuntu ssm plugin install and exec doc cr https://code.amazon.com/reviews/CR-44013235 * Address feedback * chore(manifest): rename execute_command to exec cr https://code.amazon.com/reviews/CR-44072460 * chore(exec): UI changes and test fixes cr https://code.amazon.com/reviews/CR-44358240 * chore: fix unit test cr https://code.amazon.com/reviews/CR-44369866 * chore(template): switch AMZN::ECS::Service to AWS::ECS::Service cr https://code.amazon.com/reviews/CR-44443109 * chore(exec): add flag to skip confirmation for SSM plugin * chore(exec): task exec task family name should be prefixed * chore(e2e): add exec suite cr https://code.amazon.com/reviews/CR-44552067 * Address feedback * Add to the e2e buildspec * chore(doc): add exec video cr https://code.amazon.com/reviews/CR-47049800 * Disable exec e2e test * Remove new-sdk-go and update aws ecs sdk go
This change displays secrets as a separate category (not within "Variables") in `svc show`. If the secret value comes from Parameter Store, it is preceded by `parameter/`. Otherwise, if it comes from Secrets Manager, it is displayed as an ARN. Addresses aws#720 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
* chore: add custom aws-sdk-go for ECS cr https://code.amazon.com/reviews/CR-39348057 * commit e19046ca2668f00fdbd4d328d86ef2b9e576b9d5 Author: penghaoh <[email protected]> Date: 2020-11-30T22:14:28.000Z Address feedback commit c09bbba6bd10d646417510d998451a1f2e141bbe Author: penghaoh <[email protected]> Date: 2020-11-23T23:23:21.000Z chore: add boilerplate for copilot exec cr https://code.amazon.com/reviews/CR-39357784 commit 46a0f2bea06e6436e1ecf333546f5a3fa50411e2 Author: penghaoh <[email protected]> Date: 2020-11-23T20:14:22.000Z chore: add custom aws-sdk-go for ECS cr https://code.amazon.com/reviews/CR-39348057 commit 25be354 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: 2020-11-30T17:07:40.000Z chore: Bump github.com/briandowns/spinner from 1.11.1 to 1.12.0 (aws#1729) Bumps [github.com/briandowns/spinner](https://github.com/briandowns/spinner) from 1.11.1 to 1.12.0. - [Release notes](https://github.com/briandowns/spinner/releases) - [Commits](briandowns/spinner@v1.11.1...v1.12) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> commit ef735c9 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: 2020-11-30T17:02:37.000Z chore: Bump github.com/aws/aws-sdk-go from 1.35.33 to 1.35.35 (aws#1730) Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.35.33 to 1.35.35. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md) - [Commits](aws/aws-sdk-go@v1.35.33...v1.35.35) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit ce836bd Author: Janice Huang <[email protected]> Date: 2020-11-24T22:43:38.000Z chore(cli): make the dashes under column headings consistent (aws#1705) Wherever command output is in tabular format, this brings consistency to our formatting-- dashes (same length as heading, not longest element) below the headings. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. commit 6128e9c Author: Janice Huang <[email protected]> Date: 2020-11-24T20:22:47.000Z feat(cli): display secrets as subcategory in `svc_show` (aws#1704) This change displays secrets as a separate category (not within "Variables") in `svc show`. If the secret value comes from Parameter Store, it is preceded by `parameter/`. Otherwise, if it comes from Secrets Manager, it is displayed as an ARN. Addresses aws#720 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. commit 42567bf Author: Efe Karakus <[email protected]> Date: 2020-11-23T21:39:32.000Z docs(README): remove preview program description (aws#1722) _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ * chore(cli): boilerplate for svc/job/task exec cr https://code.amazon.com/reviews/CR-39984997 * Address feedback and add --cluster flag to task exec * chore(cli): add validate and ask for svc exec cr https://code.amazon.com/reviews/CR-40079015 * chore(cli): implement svc exec Execute() cr https://code.amazon.com/reviews/CR-40177002 * Address comment * chore(ecs): implement ExecuteCommand API cr https://code.amazon.com/reviews/CR-40448327 * Remove log in ecs pkg * Add log prompting users to delete the orphan session * Remove ErrExecuteCommand * chore(exec): implement StartSession for OS cr https://code.amazon.com/reviews/CR-40615982 * Use http/Get to download the binary instead of curl to local * Move ssm plugin validate to cli pkg * chore(ecs): remove terminate session call in ExecuteCommand cr https://code.amazon.com/reviews/CR-40863766 * chore(exec): add plugin management for non macos platforms cr https://code.amazon.com/reviews/CR-40966835 * chore: use gamma endpoint for ECS and RGTA client * Avoid outputting when validating ssm plugin on windows * Update frontend model * Address feedback * Address feedback * chore(exec): apply interactive run to start session cr https://code.amazon.com/reviews/CR-41395554 * chore(manifest): add exec field to the manifest cr https://code.amazon.com/reviews/CR-41475925 * chore(stack): update stack pkg and CFN template for services and environment cr https://code.amazon.com/reviews/CR-41546916 * Address iyerv@ feedback * Rename exec to executeCommand and use go template instead of CFN param * chore(cli): remove interactive flag and job exec cr https://code.amazon.com/reviews/CR-41851301 * chore(cli): add task exec validate cr https://code.amazon.com/reviews/CR-41860865 * chore(cli): add ssm plugin validation for task exec cr https://code.amazon.com/reviews/CR-41862462 * chore(selector): add running tasks selector (aws#1792) <!-- Provide summary of changes --> Add `RunningTask()` to `selector` pkg, allowing to select a running copilot task. <!-- Issue number, if available. E.g. "Fixes aws#31", "Addresses aws#42, 77" --> By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. * Resolve merging conflict cr https://code.amazon.com/reviews/CR-41929264 * chore(cli): add Ask() for task exec cr https://code.amazon.com/reviews/CR-41994838 * Fix prompt text cr https://code.amazon.com/reviews/CR-42292095 * Address feedback * chore(templates): add resource comments to v1.2.0 env template * chore(cli): implement Execute() for task exec cr https://code.amazon.com/reviews/CR-42377497 * chore: enable execute-command for task run cr https://code.amazon.com/reviews/CR-42467741 * chore(cli): remove exec related unused code cr https://code.amazon.com/reviews/CR-42531908 * docs: add docs for svc/task exec cr https://code.amazon.com/reviews/CR-42539124 * Address feedback * chore(cli): task exec should be able to use --default in workspace cr https://code.amazon.com/reviews/CR-43124690 * chore(env): update v1.2.0 env template cr https://code.amazon.com/reviews/CR-43574909 * chore(doc): add info for svc-exec cr https://code.amazon.com/reviews/CR-43631507 * chore: fix template bugs and remove gamma endpoint usage cr https://code.amazon.com/reviews/CR-43826647 * Address feedback * Update the doc * chore(task): add default task role for exec cr https://code.amazon.com/reviews/CR-43838665 * Update task exec doc * chore(exec): enable svc exec by default cr https://code.amazon.com/reviews/CR-43849472 * Change execute_command default to false * chore(exec): task exec only lists one-off task cr https://code.amazon.com/reviews/CR-43918751 * chore: fix ubuntu ssm plugin install and exec doc cr https://code.amazon.com/reviews/CR-44013235 * Address feedback * chore(manifest): rename execute_command to exec cr https://code.amazon.com/reviews/CR-44072460 * chore(exec): UI changes and test fixes cr https://code.amazon.com/reviews/CR-44358240 * chore: fix unit test cr https://code.amazon.com/reviews/CR-44369866 * chore(template): switch AMZN::ECS::Service to AWS::ECS::Service cr https://code.amazon.com/reviews/CR-44443109 * chore(exec): add flag to skip confirmation for SSM plugin * chore(exec): task exec task family name should be prefixed * chore(e2e): add exec suite cr https://code.amazon.com/reviews/CR-44552067 * Address feedback * Add to the e2e buildspec * chore(doc): add exec video cr https://code.amazon.com/reviews/CR-47049800 * Disable exec e2e test * Remove new-sdk-go and update aws ecs sdk go
This change displays secrets as a separate category (not within "Variables") in
svc show
. If the secret value comes from Parameter Store, it is preceded byparameter/
. Otherwise, if it comes from Secrets Manager, it is displayed as an ARN.Addresses #720
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.