-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
postgresql_ext: sort list of available versions #1078
Conversation
If `version == 'latest'` then the version is set to `available_versions[-1]` however `available_versions` was not previously sorted so the ordering was the natural order of the `pg_available_extension_versions` view.
@snopoke thanks for the PR!
|
The test
The test
The test
|
changelogs/fragments/1078-postgresql_ext_fix_version_selection_when_version_is_latest.yml
Outdated
Show resolved
Hide resolved
Co-authored-by: Andrew Klychkov <[email protected]>
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.
LGTM
@snopoke thanks for the fix! |
* sort list of available versions If `version == 'latest'` then the version is set to `available_versions[-1]` however `available_versions` was not previously sorted so the ordering was the natural order of the `pg_available_extension_versions` view. * remove unnecessary lambda * create changelog fragment for #1078 * add PR link to changelog fragment Co-authored-by: Andrew Klychkov <[email protected]> Co-authored-by: Andrew Klychkov <[email protected]> (cherry picked from commit 159f38f)
* sort list of available versions If `version == 'latest'` then the version is set to `available_versions[-1]` however `available_versions` was not previously sorted so the ordering was the natural order of the `pg_available_extension_versions` view. * remove unnecessary lambda * create changelog fragment for #1078 * add PR link to changelog fragment Co-authored-by: Andrew Klychkov <[email protected]> Co-authored-by: Andrew Klychkov <[email protected]> (cherry picked from commit 159f38f) Co-authored-by: Simon Kelly <[email protected]>
SUMMARY
If
version == 'latest'
then the version is set toavailable_versions[-1]
howeveravailable_versions
was not previously sorted so the ordering was the natural order of thepg_available_extension_versions
view.This PR sorts the version using
LooseVersion
so that the version taken is in fact the latest available version.ISSUE TYPE
COMPONENT NAME
postgresql_ext