Skip to content

Conversation

@GAURAVRAMRAKHYANI
Copy link
Contributor

@GAURAVRAMRAKHYANI GAURAVRAMRAKHYANI commented Feb 24, 2023

There were some comments left on the pull request #161 which were not addressed in that pull request as the comments were non-blocking for that pull request. We have merged that pull request and addressed the comments in this new pull request.

Changes done:
(a) Use package_manager.get_package_manager_setting(Constants.PKG_MGR_SETTING_IDENTITY) to get the package manager name which will return values like "apt", "yum" or "zypper" instead of using package_manager.class.name which returns class name like AptitudePackageManager, etc.

(b) Update number_of_tries to retry_count

(c) Update number_of_rounds to retry_count

Manual testing completed:
Tested that one-time assessment and one-time install patches are working fine.
Tested that the log generated has expected package manager name and now retry_count is there in log instead of number_of_tries

Example of perf log for assessment:
Stopwatch details: {'start_time': '2023-02-24 07:27:47.045594', 'end_time': '2023-02-24 07:27:49.749904', 'time_taken': '0.04507183333333333', 'machine_info': {'platform_name': 'Ubuntu', 'platform_version': '18.04', 'machine_cpu': 'Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz', 'machine_arch': 'x86_64', 'disk_type': 'Hard drive'}, 'message': "{'task': 'Assessment', 'task_status': 'succeeded', 'error_msg': '', 'package_manager': 'apt', 'retry_count': '1'}"}

Example of perf log for installation:
Stopwatch details: {'start_time': '2023-02-24 07:30:20.425733', 'end_time': '2023-02-24 07:34:18.866651', 'time_taken': '3.9740153', 'machine_info': {'platform_name': 'Ubuntu', 'platform_version': '18.04', 'machine_cpu': 'Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz', 'machine_arch': 'x86_64', 'disk_type': 'Hard drive'}, 'message': "{'task': 'Installation', 'task_status': 'succeeded', 'error_msg': '', 'package_manager': 'apt', 'patch_operation_successful': 'True', 'installed_patch_count': '2', 'retry_count': '1', 'maintenance_window': '3:55:00', 'perc_maintenance_window_used': '2.147989744680851', 'maintenance_window_exceeded': 'False'}"}

…_SETTING_IDENTITY) to get the package manager name which will return values like "apt", "yum" or "zypper" instead of using package_manager.__class__.__name__ which returns values like AptitudePackageManager

(b) Update number_of_tries to retry_count

(c) Update number_of_rounds to retry_count
@codecov
Copy link

codecov bot commented Feb 24, 2023

Codecov Report

Merging #173 (82dd3f1) into master (006d225) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #173   +/-   ##
=======================================
  Coverage   88.75%   88.75%           
=======================================
  Files          88       88           
  Lines       12881    12881           
=======================================
  Hits        11432    11432           
  Misses       1449     1449           
Flag Coverage Δ
python27 87.23% <100.00%> (ø)
python39 88.72% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/core/src/bootstrap/Constants.py 98.52% <100.00%> (ø)
src/core/src/core_logic/PatchAssessor.py 99.35% <100.00%> (ø)
src/core/src/core_logic/PatchInstaller.py 85.39% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@GAURAVRAMRAKHYANI GAURAVRAMRAKHYANI merged commit 938ab4c into master Feb 27, 2023
@GAURAVRAMRAKHYANI GAURAVRAMRAKHYANI deleted the garamrak-updateVariableNames branch February 27, 2023 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants