-
Notifications
You must be signed in to change notification settings - Fork 87
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
[RHELC-1393] Move logger initialization to initialize module #1095
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1095 +/- ##
=======================================
Coverage 94.89% 94.90%
=======================================
Files 49 49
Lines 4549 4550 +1
Branches 809 809
=======================================
+ Hits 4317 4318 +1
Misses 156 156
Partials 76 76
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Initializing the logger module earlier makes the tool work correctly when trying to find the /etc/system-release file, and if it is not there, throw a critical error to the user before anything else happens. If we don't move the module to this point, the first /etc/system-releaes check will silently fail and only the next call will throw the exception, because at this point, we already have the logger initialized. To prevent further executions in the system, it is more reliable to initialize the logger module earlier. Signed-off-by: Rodolfo Olivieri <[email protected]>
Signed-off-by: Rodolfo Olivieri <[email protected]>
c4b1530
to
e8d4af8
Compare
/packit test --labels tier0 |
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.
Changes look good to me!
Only 1 test failing unrelated to code, merging |
* Move logger initialization to initialize module Initializing the logger module earlier makes the tool work correctly when trying to find the /etc/system-release file, and if it is not there, throw a critical error to the user before anything else happens. If we don't move the module to this point, the first /etc/system-releaes check will silently fail and only the next call will throw the exception, because at this point, we already have the logger initialized. To prevent further executions in the system, it is more reliable to initialize the logger module earlier. Signed-off-by: Rodolfo Olivieri <[email protected]> * Revert initialize_file_logger function Signed-off-by: Rodolfo Olivieri <[email protected]> --------- Signed-off-by: Rodolfo Olivieri <[email protected]>
Initializing the logger module earlier makes the tool work correctly when trying to find the /etc/system-release file, and if it is not there, throw a critical error to the user before anything else happens.
If we don't move the module to this point, the first /etc/system-releaes check will silently fail and only the next call will throw the exception, because at this point, we already have the logger initialized.
To prevent further executions in the system, it is more reliable to initialize the logger module earlier.
Jira Issues: RHELC-1393
Checklist
[RHELC-]
is part of the PR titleRelease Pending
if relevant