-
Notifications
You must be signed in to change notification settings - Fork 36
checks: Implement bespoke version parser #191
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?
Conversation
this should probably just be a separate PR as it's unrelated, but, at the least should be its own commit. |
|
Do you mean the cleanup, or the new check? |
|
looks good to me, did some testing on my own as well with a collection of logs and saw no issues. |
| # special case for OBS 24.0.3 and earlier, which report Windows 10/1909 | ||
| # as being Windows 10/1903 | ||
| versionString = getOBSVersionString(lines) | ||
| if parse_version(versionString) <= parse_version("24.0.3"): | ||
| if verinfo["version"] == "10.0" and verinfo["release"] == 1903: | ||
| return [LEVEL_INFO, "Windows 10 1903/1909", | ||
| "Due to a bug in OBS versions 24.0.3 and earlier, the exact release of Windows 10 you are using cannot be determined. You are using either release 1903, or release 1909. Fortunately, there were no major changes in behavior between Windows 10 release 1903 and Windows 10 release 1909, and instructions given here for release 1903 can also be used for release 1909, and vice versa."] | ||
|
|
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.
Has this check been completely removed?
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.
Yes, I assumed that obs 24 was far away enough that it wasn't needed, especially given that it concerns versions of windows that have been EOL for a bit and is quite moot to start with given the difference between windows 1903 and 1909 are quite minimal (it states so itself).
The last occurence of it appearing in an analyzer result on the official discord server was december 2020.
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.
Will leave that call up to @Fenrirthviti .
7599526 to
eecfafb
Compare
Description
This replaces the usage of
pkg_resources.parse_versionwith a version parser custom-made for OBS versioning.It obeys to the semver 2.0.0 spec except for a stricter definition of pre-release versioning.
I also took the opportunity to cleanup messages relating to long-outdated versions of obs, and to add an "oudated beta" check that was suggested in comments.
The original includes a check for "caffeine" builds of OBS as an unofficial one. Having never seen one of those in years of support I would assume it isn't relevant anymore, but without clear knowledge on what those are, I preferred to leave it in. Clarifications on their current relevance is welcome.
Motivation and Context
pkg_resources.parse_versionwas only ever meant to be used for python packages and with setuptools >= 66.0 raises an error when called on a version that doesn't conform to python packages versioning rules. As an example, the simple inclusion of a-modified, quite frequent in obs versioning, is enough to break said rules, and as such, the analyzer.While not currently breaking, as the analyzer is run on rather old python, the potential of breaking upon update is rather unwishable, and we should rely on a tool intended for the job, instead of using one in an unintended and unsupported way.
How Has This Been Tested?
Ran it with a bunch of logs plucked from the support server, observed no breaking, and proper reporting of version.
Types of changes
Checklist: