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
CLI: doctor
command
#10115
CLI: doctor
command
#10115
Conversation
Not clear at this point why such filter was added. It's harmful for commands configured externally of `Serverless` class
Codecov Report
@@ Coverage Diff @@
## master #10115 +/- ##
==========================================
+ Coverage 85.26% 85.35% +0.08%
==========================================
Files 334 337 +3
Lines 13640 13721 +81
==========================================
+ Hits 11630 11711 +81
Misses 2010 2010
Continue to review full report at Codecov.
|
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.
🎉 🎉
Just tested, that's awesome!
I added minor suggestions for wording, and noted one detail: if I run the command twice it "forgets" the previous deprecations, which was surprising. For example:
Would it make sense that sls doctor
doesn't clear the list of deprecations? So that I can run sls doctor
several times and get the same result.
@mnapoli it's a bit tricky, as
|
👍 understood |
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 great 👏 I have one question, but it's more out of curiosity about your reasoning.
const path = require('path'); | ||
const os = require('os'); | ||
|
||
module.exports = path.resolve(os.homedir(), '.serverless/last-command-health-status'); |
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.
Is there a particular reason to introduce a new file for tracking this instead of using .serverlessrc
for example? We're already tracking there information such as shownNotificationsHistory
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.
@pgrzesik very good question. I was leaning towards that at first, but then I thought it'll be a bit dirty. serverlessrc
is about user configuration, while here we're storing the output of a command to eventually be run afterwards, also this output can be long.
So there are two factors that directed me to approach as implemented:
- Output can be large, and will be quite noisy when you inspect user configuration, also rewriting this JSON file constantly, with now much larger content, felt not that optimal.
- This output is not really a configuration data.
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.
That makes sense, I agree with the reasoning here and it sounds to me like a good call 👍
c63accc
to
37e22b9
Compare
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 great 👍
Addresses #9860
doctor
command implementation, dedicated to print details on deprecations as triggered by previous command.As this command is dedicated for modern logs, it's configured now to be hidden in help, and no mention in documentation is added (it'll be in v3 branch)
Addoitionally: