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

refactor(CLI): Modern logs for config-related command #10038

Merged
merged 5 commits into from Oct 4, 2021

Conversation

pgrzesik
Copy link
Contributor

@pgrzesik pgrzesik commented Oct 1, 2021

Addresses: #9860

@codecov
Copy link

codecov bot commented Oct 1, 2021

Codecov Report

Merging #10038 (09b979a) into master (f73062f) will decrease coverage by 0.13%.
The diff coverage is 78.94%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10038      +/-   ##
==========================================
- Coverage   85.88%   85.75%   -0.14%     
==========================================
  Files         333      333              
  Lines       13416    13432      +16     
==========================================
- Hits        11523    11518       -5     
- Misses       1893     1914      +21     
Impacted Files Coverage Δ
lib/plugins/config.js 75.60% <69.23%> (-0.40%) ⬇️
lib/plugins/aws/configCredentials.js 100.00% <100.00%> (ø)
lib/plugins/print.js 71.21% <0.00%> (-28.79%) ⬇️
lib/cli/write-service-outputs.js 83.33% <0.00%> (-2.39%) ⬇️
lib/plugins/aws/logs.js 87.71% <0.00%> (-0.42%) ⬇️
lib/cli/handle-error.js 85.71% <0.00%> (-0.29%) ⬇️
lib/plugins/install.js 100.00% <0.00%> (ø)
lib/plugins/aws/info/index.js 100.00% <0.00%> (ø)
lib/plugins/aws/deploy/index.js 100.00% <0.00%> (ø)
lib/plugins/aws/utils/formatLambdaLogEvent.js 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f73062f...09b979a. Read the comment docs.

@pgrzesik pgrzesik requested a review from medikoo October 1, 2021 14:00
`Failed! ~/.aws/credentials already has a "${this.options.profile}" profile. Use the overwrite flag ("-o" or "--overwrite") to force the update`
);
log.notice.skip(
`Profile "${this.options.profile}" is already configured in ~/.aws/credentials. Use the overwrite flag ("-o" or "--overwrite") to force the update.`
Copy link
Contributor

Choose a reason for hiding this comment

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

This feels more as an error. I would I think convert it to ServerlessError exception

@@ -80,7 +81,9 @@ class Config {
}
if (this.options.autoupdate) {
if (config.get('autoUpdate.enabled')) {
this.serverless.cli.log('Auto update is already turned on');
const message = 'Auto update is already turned on';
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not generalize to vars

Copy link
Contributor

@medikoo medikoo 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 👍

@pgrzesik pgrzesik merged commit f8ad7bc into master Oct 4, 2021
@pgrzesik pgrzesik deleted the modern-logs-for-config branch October 4, 2021 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants