-
Notifications
You must be signed in to change notification settings - Fork 11
Bugfix: Apply SSL expired cmd fix to RHEL images only #317
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
base: master
Are you sure you want to change the base?
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.
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 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)
self.assertTrue('Customer environment error (expired SSL certs)' in str(context.exception)) | ||
|
||
# Restore mock | ||
self.runtime.env_layer.platform.extract_linux_distribution_os_info = original_env_layer_platform_linux_distribution |
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.
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 |
Copilot uses AI. Check for mistakes.
code, output = self.__read_record(operation) | ||
return eval(output) | ||
|
||
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.
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: |
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.
?
[x] apply ssl expired cmd fix only to rhel images

[x] pending unit tests