-
Notifications
You must be signed in to change notification settings - Fork 11
Bugfix: Restore patch mode config on Image Default #301
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
Conversation
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.
Pull Request Overview
This PR restores the configuration of machine default auto updates when patch mode is reset to ImageDefault, ensuring that the appropriate backup settings are reapplied for supported package managers. Key changes include:
- Restoring machine default auto updates for both Yum and Aptitude package managers.
- Adding new tests to verify the revert functionality under various service configurations.
- Introducing a stub for the Zypper package manager’s revert functionality.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
src/core/tests/library/LegacyEnvLayerExtensions.py | Adds conditional handling for reverting to ImageDefault for Yum. |
src/core/tests/Test_YumPackageManager.py | Introduces tests for reverting auto OS update settings for Yum services. |
src/core/tests/Test_ConfigurePatchingProcessor.py | Adds test setup to validate ImageDefault patch mode configuration. |
src/core/tests/Test_AptitudePackageManager.py | Adds tests for reverting auto OS update configuration under Aptitude. |
src/core/src/package_managers/ZypperPackageManager.py | Adds an unimplemented stub for reverting auto OS update configuration. |
src/core/src/package_managers/YumPackageManager.py | Implements revert functionality for Yum, DNF, and PackageKit services. |
src/core/src/package_managers/PackageManager.py | Introduces an abstract stub for revert functionality. |
src/core/src/package_managers/AptitudePackageManager.py | Implements revert functionality for Aptitude package manager. |
src/core/src/core_logic/ConfigurePatchingProcessor.py | Updates patch mode handling to include the ImageDefault branch. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #301 +/- ##
==========================================
+ Coverage 93.53% 93.73% +0.19%
==========================================
Files 103 103
Lines 17458 17881 +423
==========================================
+ Hits 16330 16760 +430
+ Misses 1128 1121 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Ping on status of this PR. |
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.
Comments inline
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.
Minor comment on unexercised code.
this release includes: [x] [Bugfix: Restore patch mode config on Image Default #301](#301) [x] [Clean-up: Envlayer dead-code clean-up for Environment Recorder and Emulator #304](#304) [x] [Bugfix: Reboot Manager behavior - multiple bugfixes & error rate reduction #310](#310) [x] [Bugfix: Fix sudo check logs and wordings #315](#315) [x] [Bugfix: Mitigation for environments with Python Unbuffered I/O #320](#320)
this release includes: [x] Bugfix: Restore patch mode config on Image Default (#301) [x] Clean-up: Envlayer dead-code clean-up for Environment Recorder and Emulator ( #304) [x] Bugfix: Reboot Manager behavior - multiple bugfixes & error rate reduction (#310) [x] Bugfix: Fix sudo check logs and wordings (#315) [x] Bugfix: Mitigation for environments with Python Unbuffered I/O (#320) [x] Bugfix: Correct reboot management parameters(#322)
We have a force disable logic for machine default auto updates in Auto Patching. i.e. we disable all machine default auto updates if the VM is onboarded to Auto Patching.
This PR ensures that we reset to machine default auto updates when patch mode is reset to ImageDefault
Changes included
[x] Resetting to machine default for Aptitude Package Manager
[x] Resetting to machine default for Tdnf Package Manager
[x] Resetting to machine default for Yum Package Manager
[x] Resetting to machine default for Zypper Package Manager
In VM Tests
[x] Aptitude Package Manager: Tested on: Ubuntu 20.04
- 1.core.log
[x] Tdnf Package Manager: Tested on Az Linux 2
- 7.core.log
[x] Yum Package Manager: Tested on: RHEL 8.2
- 4.core.log & 3.core.log
[x] Zypper Package Manager: Tested on: SUSE 12
- 3.core.log
Pending
[x] log and preserve masked state and not disable machine default auto updates if the underlying config is masked (will be addressed in a separate PR)