-
Notifications
You must be signed in to change notification settings - Fork 993
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
Fixes #36547 - Fix parsing of Ubuntu version in fact parsers #9760
Conversation
Issues: #36547 |
Can one of the admins verify this patch? |
2 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
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.
While technically correct, I think this may cause problems. For example, in searching it splits on the dot here:
I also wonder about migrations. Should we introduce a DB migration where we change the existing OS versions in the DB?
Hey @ekohl I have incorporated your feedback. I also searched for all areas of code where the version is parsed / used and fixed them. Hopefully I got them all. :) Regarding db migrations: Should we consider anything else despite changing the version of the operating system (for example migrating to existing OSes with the correct version)? |
Hey @ekohl, Please let me know if anything is missing. |
major = os_major_version | ||
minor = os_minor_version |
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.
I've been debating making this the behavior everywhere and would be OK with trying that.
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.
So that we simply leave out the if / else part and use os_major_version
and os_minor_version
for all operating systems? I also noticed that the if orel.present?
isn't necessary here anymore, as the whole part from line 8 to line 24 is no longer dependent on it.
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.
indeed, get rid of orel altogether.
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.
I had a look at relying on the major
and minor
versions reported by facter and it doesn't fit for all operating systems. The os_release
often uses the full
release reported by facter and parses it as necessary. Relying on the reported major
and minor
versions breaks some of the OSes (like Solaris and CentOS 8).
IMO it would be best to rework detection of the OS version in the PuppetFactParser in a separate PR.
Good morning and a happy new year :) |
Thanks @ekohl , I'll have a look at the usage of factories and facterdb and adjust my changes. |
Thank you for your contribution! This PR has been inactive for 3 months, closing for now. Feel free to reopen when you return to it. This is an automated process. |
No description provided.