Repository navigation
fix: improve OpenStack image lookup and architecture tokenization - #302
Open
simonepelosi wants to merge 2 commits into
Open
simonepelosi wants to merge 2 commits into
simonepelosi wants to merge 2 commits into
Conversation
Update termExp in toTerms to recognize known architectures
(amd64v3, ppc64el, riscv64, amd64, arm64, armhf, armel, s390x, i386)
as atomic terms before splitting letters and numbers.
Previously, amd64 was tokenized into "amd" and "64", which matched
"amd64v3" ("amd", "64", "v", "3") as a subsequence. When both amd64
and newer amd64v3 images were present, amd64v3 was selected by mistake.
By matching architecture names atomically, searching for amd64 will
not match amd64v3.
Image names are not unique in OpenStack. The lookup returned the first exact-name match in list order, so it did not reliably pick the newest image, and it never looked at kernel_id. Select the newest among all exact-name matches, and among all term matches if there is no exact one. If the requested image contains the riscv64 token, an image with kernel_id set ranks above a newer one without it. Exact-name matches still win over term matches. Fix the README description of the lookup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out the OpenStack image lookup changes from #300:
amd64v3,ppc64el,riscv64,amd64,arm64,armhf,armel,s390x,i386) as whole terms intoTermssoamd64does not matchamd64v3.kernel_idset whenriscv64is requested.README.mdto document the OpenStack image selection behavior.