Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support comparing Alpine versions locally (#980)
This introduces support for comparing Alpine versions locally using the same logic as the `apk` package manager, along with a generator for generating fixtures. There is a bit of fuzziness in the behaviour across different versions of `apk` - the `alpine:3.x` docker images all use `apk` v2.x, which is what the fixture generator uses too and at least `apk` v2.14 (which is used by `alpine:3.19`) and v2.10 pass; however the current latest upcoming version of `apk` technically fails on approximately 30 fixtures which I think is because it has fixed https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10088. Beyond that I was able to find a handful of other edge cases where the comparison results between these versions was different, but they all seemed to be primarily around the handling of invalid versions which are not expected to be present in OSV data anyway and they look to be the result of bugfixes meaning we'd need special "anti" handling to support in a way that ensures valid versions are still compared correctly, so I think it's good enough to ship. Resolves #952
- Loading branch information