Bugfix: Apply SSL expired cmd fix to RHEL images only#317
Bugfix: Apply SSL expired cmd fix to RHEL images only#317
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #317 +/- ##
==========================================
- Coverage 93.15% 93.04% -0.11%
==========================================
Files 103 103
Lines 17608 17663 +55
==========================================
+ Hits 16402 16435 +33
- Misses 1206 1228 +22
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:
|
…into Bugfix/apply_microsoft_repo_cmd_to_rhel_os_only pull master changes
a4d0bb8 to
d150a83
Compare
d150a83 to
b488dfc
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the SSL certificate update command to apply only to RHEL images and introduces unit tests to cover success and failure cases.
- Updated tests in Test_YumPackageManager.py for SSL certificate issue on both RHEL and non-RHEL images
- Modified YumPackageManager.py to conditionally run the SSL fix based on the image type and adjusted error logging
- Removed the unused yum_update_client_package attribute and inlined its value for clarity
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/core/tests/Test_YumPackageManager.py | Added unit tests to verify SSL issue fix behavior for various OS |
| src/core/src/package_managers/YumPackageManager.py | Adjusted logic for RHEL image detection and SSL fix, updated log text |
Comments suppressed due to low confidence (1)
src/core/src/package_managers/YumPackageManager.py:926
- [nitpick] There is an inconsistency in the log prefix '[YMP]' compared to other messages that use '[YPM]'. Consider unifying the prefixes for consistency.
error_msg = '[YMP] Customer environment error (Unable to auto-mitigate known issue): [Out={0}]'.format(output)
There was a problem hiding this comment.
It appears the restoration of the platform function is targeting 'extract_linux_distribution_os_info', which is inconsistent with the earlier usage of 'linux_distribution'. This may lead to unexpected behavior in subsequent tests; consider restoring the correct attribute.
| self.runtime.env_layer.platform.extract_linux_distribution_os_info = original_env_layer_platform_linux_distribution | |
| self.runtime.env_layer.platform.linux_distribution = original_env_layer_platform_linux_distribution |
| code, output = self.__read_record(operation) | ||
| return eval(output) | ||
|
|
||
There was a problem hiding this comment.
Revert - avoid file touches that are not really changes
| if self.env_layer.platform.linux_distribution() is not None: | ||
| if self.env_layer.platform.linux_distribution is not None: |
[x] apply ssl expired cmd fix only to rhel images

[x] pending unit tests