postgresql_ext - Added idempotence always both in standard and in check mode#545
Merged
hunleyd merged 18 commits intoansible-collections:mainfrom Aug 3, 2023
Merged
Conversation
Contributor
Author
|
Ready for review |
Added prev_version and version return values.
Contributor
Author
|
@Andersson007 I added new module return values and I put collection version 3.1.0 in documentation. Free to change it if this PR is planned for a different release. |
Collaborator
Andersson007
left a comment
There was a problem hiding this comment.
@RealGreenDragon great job is here, thanks!
I took a quick look and left a comment.
I need to schedule a time slot for review. I hope i'll find time in the first half of the week.
Thanks!
hunleyd
requested changes
Jul 31, 2023
Collaborator
|
pinging @keithf4 for his thoughts on the same |
Andersson007
approved these changes
Aug 3, 2023
hunleyd
approved these changes
Aug 3, 2023
jchancojr
approved these changes
Aug 3, 2023
Collaborator
|
since #504 wasn't backported, i assume this shouldn't be either, @Andersson007 ? |
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.
SUMMARY
I figured out that my PR #504 add idempotence when version=latest in standard mode but NOT in check mode.
It is caused by missing update path check when
version=latestbut actually the check is possibile.When latest extension version is requested (both in create and update), the
default_versionspecified in extension control file is installed:It is confirmed also by the source code:
https://github.com/postgres/postgres/blob/d088ba5a5aa410d39b64f013e8433ad9eb3d17f1/src/backend/commands/extension.c#L3056_L3069
My PR add idempotence when provided
version=latestalso in check mode, parsing the extensiondefault_versionand using it to perform all checks (become useless as has been removed).Other addictions:
prev_versionandversionat module output (possible asdefault_versionis now parsed)Bugfixes:
queriesreturn value had wrong value innameparametersISSUE TYPE
COMPONENT NAME
postgresql_ext
ADDITIONAL INFORMATION
The second task of following play results not changed: