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

fix(logging): Added check for log level value #13941

Merged
merged 22 commits into from Feb 7, 2022

Conversation

hasanwhitesource
Copy link
Contributor

@hasanwhitesource hasanwhitesource commented Feb 1, 2022

Changes:

Renovate will now check if the log level from the config is a valid bunyan logLevel value and will log error and then stops running.

Context:

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@CLAassistant
Copy link

CLAassistant commented Feb 1, 2022

CLA assistant check
All committers have signed the CLA.

viceice
viceice previously requested changes Feb 1, 2022
lib/config/validation.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

Call validateLogLevel() from the main code, and let that function log and exit if the value is invalid. Otherwise continue

lib/logger/index.ts Outdated Show resolved Hide resolved
lib/logger/index.ts Outdated Show resolved Hide resolved
lib/logger/index.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
@rarkins rarkins changed the title fix(#9526): Added check for log level value fix(logging): Added check for log level value Feb 1, 2022
…ogLevelCheck

# Conflicts:
#	lib/logger/index.spec.ts
#	yarn.lock
lib/config/migration.spec.ts Outdated Show resolved Hide resolved
lib/logger/index.spec.ts Outdated Show resolved Hide resolved
lib/logger/index.ts Outdated Show resolved Hide resolved
lib/logger/index.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
tsconfig.spec.json Outdated Show resolved Hide resolved
@rarkins rarkins marked this pull request as draft February 1, 2022 14:47
@hasanwhitesource
Copy link
Contributor Author

@rarkins @viceice I will create a new branch with clean changes.

@rarkins
Copy link
Collaborator

rarkins commented Feb 2, 2022

@hasanwhitesource in future it's preferred that you keep the same PR, so that you create less noise for everyone else. Now, every comment made before will be lost and not transferred to your new PR.

Worst case keep the same PR but force push your changes from a clean branch locally.

@hasanwhitesource hasanwhitesource marked this pull request as ready for review February 2, 2022 11:47
lib/logger/index.spec.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
lib/logger/index.spec.ts Outdated Show resolved Hide resolved
lib/logger/index.spec.ts Outdated Show resolved Hide resolved
lib/logger/index.spec.ts Outdated Show resolved Hide resolved
lib/logger/index.spec.ts Outdated Show resolved Hide resolved
lib/logger/index.spec.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
lib/logger/utils.spec.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

Does Bunyan accept both upper and lower case? If not, are you doing any massaging of the string?

@hasanwhitesource
Copy link
Contributor Author

Does Bunyan accept both upper and lower case? If not, are you doing any massaging of the string?

Yes it works with all lower case or all uppercase characters

hasanwhitesource and others added 2 commits February 3, 2022 10:04
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
lib/logger/utils.spec.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
lib/logger/utils.ts Outdated Show resolved Hide resolved
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
lib/logger/index.ts Outdated Show resolved Hide resolved
hasanwhitesource and others added 2 commits February 4, 2022 13:48
Also trim

Co-authored-by: Rhys Arkins <rhys@arkins.net>
@hasanwhitesource
Copy link
Contributor Author

@viceice Are there anymore changes that need to be done you think?

@rarkins rarkins enabled auto-merge (squash) February 7, 2022 08:33
@rarkins rarkins merged commit 85cf82e into renovatebot:main Feb 7, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 31.68.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

renovate fails to run due to fatal error in bunyan setup
6 participants