-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[master] feat: Add OS grain mappings for AlmaLinux Kitten #66991
base: master
Are you sure you want to change the base?
Conversation
Question for a reviewer: I looked for ways to add tests, and I couldn't find any existing grain testing I could tack this onto. Anecdotally, I did run this code against an AlmaLinux Kitten VM and it worked. I know this doesn't cover regression testing, but I'm not sure I'm capable of developing the scaffolding to test grain detection at this point in time. |
@jamesharr You can mock the values provided for the function to read the file,. for example, and return that info and check that the code processes them correct. Make sure you use pytest. |
@dmurphy18 , tests are added. Let me know if I need to do anything else for this PR. Apart from the changelog fagment, I'm not sure whether there are docs that need to be added. |
I'll get the CI tests fixed related to the feature change. I wound running pytest on may laptop (a mac) and not on a Linux box, so I think it skipped the test. I'm struggling to get pytest to run, though.
|
Add OS grain mappings to appropriately detect AlmaLinux Kitten (beta release of AlmaLinux 10) and treat it as a RHEL distribution. https://almalinux.org/blog/2024-10-22-introducing-almalinux-os-kitten/
c006243
to
0cb063e
Compare
So for whatever reason, a few I'm not sure how these tests were passing before and what the environment differences were, but I did add a patch to psss-through kwargs in the mock. If you feel like this is a mistake, I can remove that commit. With the addition, the tests now pass on a linux system when running |
@jamesharr try |
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.
Please fix the pre-commit issues
What does this PR do?
Add OS grain mappings to appropriately detect AlmaLinux Kitten (beta release of AlmaLinux 10) and treat it as a RHEL distribution.
AlmaLinux Kitten Release Notes: https://almalinux.org/blog/2024-10-22-introducing-almalinux-os-kitten/
What issues does this PR fix or reference?
No existing bug/issue
New Behavior
AlmaLinux Kitten
is detected and setsos_family="RHEL"
in grains; additionally theos
grain is mapped toAlmaLinux
instead ofAlmaLinux Kitten
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
No
Please review Salt's Contributing Guide for best practices, including the
PR Guidelines.
See GitHub's page on GPG signing for more information about signing commits with GPG.