Skip to content
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

Enhance OS version parsing to handle SUSE SP notation #248

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sidis-zafran
Copy link

Description

This PR enhances the versionGrok regex pattern within makeOSInfo to support SUSE Linux Enterprise Server (SLES) versions that use SP notation for Service Packs, such as 15-SP5.

The updated regex now recognizes SP as a valid separator for the minor version, allowing accurate parsing of SLES versions alongside standard major.minor.patch formats (e.g., 22.04). This change resolves issues where Minor was incorrectly set to 0 for SP-based versions and ensures compatibility with both SUSE-specific and conventional version formats.

Changes

Updated versionGrok regex: Added optional SP notation support as a prefix for the minor version.
Compatibility maintained: Supports both . and - delimiters to handle multiple versioning schemes.

Testing

Test cases added: Included tests for both SLES 15-SP5 and SLED 15-SP5 to validate correct assignment of major, minor, and patch values.

…ats and SUSE-specific SP notation for minor versions.
@sidis-zafran sidis-zafran changed the title Enhance version regex to support both standard major.minor.patch form… Enhance OS version parsing to handle SUSE SP notation Nov 13, 2024
Copy link

@MaorRayzinZ MaorRayzinZ left a comment

Choose a reason for hiding this comment

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

looks good (not that anybody can read regex)

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