Skip to content

Conversation

benank
Copy link
Contributor

@benank benank commented Jun 9, 2022

Addendum to #135.

The fix for #135 did not work because there was one more location that was setting the package manager run to be repeated even on dry runs. This PR fixes it by removing that location and only having one location that handles any reboot/repeat exit codes (and now a message in the output as well)

@benank benank requested review from a team, kjohn-msft and rane-rajasi and removed request for a team June 9, 2022 16:07
@codecov
Copy link

codecov bot commented Jun 9, 2022

Codecov Report

Merging #145 (6e3b2ef) into master (ca0c08b) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 6e3b2ef differs from pull request most recent head b8ce948. Consider uploading reports for the commit b8ce948 to get more accurate results

@@            Coverage Diff             @@
##           master     #145      +/-   ##
==========================================
+ Coverage   87.20%   87.22%   +0.01%     
==========================================
  Files          48       48              
  Lines        8357     8354       -3     
==========================================
- Hits         7288     7287       -1     
+ Misses       1069     1067       -2     
Flag Coverage Δ
python27 86.06% <100.00%> (+0.01%) ⬆️
python39 87.18% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
.../core/src/package_managers/ZypperPackageManager.py 86.93% <100.00%> (+0.34%) ⬆️

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 ca0c08b...b8ce948. Read the comment docs.

if code == self.zypper_exitcode_zypper_updated:
if code == self.zypper_exitcode_zypper_updated or self.zypper_out_zypper_updated_msg in out:
self.composite_logger.log_debug(
" - Package manager update detected. Patch installation run will be repeated.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Update log to One of the installed patches affects the package manager. Patch installation run will be repeated

else: # verbose diagnostic log
self.log_success_on_invoke(code, out)

if code == self.zypper_exitcode_zypper_updated or code == self.zypper_exitcode_reboot_required:
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove if statement. __handle_zypper_updated_or_reboot_exit_codes() will be called always irrespective of error code

@benank benank merged commit 7e1c911 into master Jun 9, 2022
@benank benank deleted the bankiel-zypp-up-fix branch June 9, 2022 18:47
@benank benank mentioned this pull request Jun 16, 2022
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.

2 participants