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: Ensure support for warn mode for modern deprecations #10502

Merged
merged 1 commit into from Jan 14, 2022

Conversation

pgrzesik
Copy link
Contributor

Reported internally

@codecov
Copy link

codecov bot commented Jan 13, 2022

Codecov Report

Merging #10502 (6d169fe) into master (427920e) will decrease coverage by 0.00%.
The diff coverage is 85.71%.

❗ Current head 6d169fe differs from pull request most recent head 685274b. Consider uploading reports for the commit 685274b to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10502      +/-   ##
==========================================
- Coverage   85.83%   85.83%   -0.01%     
==========================================
  Files         335      335              
  Lines       13930    13935       +5     
==========================================
+ Hits        11957    11961       +4     
- Misses       1973     1974       +1     
Impacted Files Coverage Δ
lib/plugins/aws/info/display.js 75.00% <50.00%> (-0.68%) ⬇️
lib/utils/logDeprecation.js 100.00% <100.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 427920e...685274b. Read the comment docs.

@pgrzesik pgrzesik requested a review from medikoo January 13, 2022 13:39
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 good, still, if I look correctly it doesn't cover well the scenario where just 1 deprecation was reported in summary mode. As then regular writeDeprecation function is used, and we've just now introduced modern logs to it.

So in modern logs on, with 1 deprecation, user will see both, a sls doctor notice and deprecation warning.

I think the only way to mitigate it is to rely on SLS_DEV_LOG_MODE and issue that log.warning only when have modern mode confirmed

@pgrzesik
Copy link
Contributor Author

Good catch - I didn't test that scenario and didn't catch it

@pgrzesik pgrzesik force-pushed the support-warn-mode-for-deprecations branch from cad66f0 to 664d825 Compare January 13, 2022 15:30
@pgrzesik pgrzesik requested a review from medikoo January 13, 2022 17:46
@pgrzesik pgrzesik force-pushed the support-warn-mode-for-deprecations branch from 664d825 to 685274b Compare January 14, 2022 11:59
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 82303b3 into master Jan 14, 2022
@pgrzesik pgrzesik deleted the support-warn-mode-for-deprecations branch January 14, 2022 12:34
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