-
Notifications
You must be signed in to change notification settings - Fork 94
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
fix: Cast connparams to allow idempotence (#280) #285
Conversation
thank you very much for the PR @jegj . Can you fix the failing tests and include a changelog fragment? |
@jegj thanks for the fix!
The port can be passed as |
@Andersson007 I pass the port as |
…ctions#280)" This reverts commit d284058.
@jegj strange, i should check it, maybe it's converted to string internally somehow but ansible output shows as it's int.. |
@Andersson007 I have added the function but still getting errors on CI. I will take a deep look and see what's the problem |
@jegj just a fyi, you can run the integration tests locally before pushing, see https://docs.ansible.com/ansible/devel/community/create_pr_quick_start.html. It'll save a bit of time as it's faster than waiting for results here |
@jegj could you also please add a changelog fragment as @hunleyd mentioned? |
@Andersson007 thanks for the info. Yes! I will add the changelog fragment shortly. Thanks all for the help, first time collaborating on an ansible collection. I should have read the documentation better |
changelogs/fragments/285-postgresql_subscription_fix_idempontece.yml
Outdated
Show resolved
Hide resolved
…ce.yml Co-authored-by: Andrew Klychkov <[email protected]>
Backport to stable-1: 💚 backport PR created✅ Backport PR branch: Backported as #289 🤖 @patchback |
* fix: Keep conninfo properties always as string (#280) * Revert "fix: Keep conninfo properties always as string (#280)" This reverts commit d284058. * fix: Cast connparams on subscription update * Fix: indent issue by accident * fix: Fix lint errors * fix: Check for None variable before cast the dict * Add fragment * Update changelogs/fragments/285-postgresql_subscription_fix_idempontece.yml Co-authored-by: Andrew Klychkov <[email protected]> Co-authored-by: Andrew Klychkov <[email protected]> (cherry picked from commit cf4eee2)
@jegj thanks very much for the contribution! We'll be happy to see more by you and help whenever needed! |
* fix: Keep conninfo properties always as string (#280) * Revert "fix: Keep conninfo properties always as string (#280)" This reverts commit d284058. * fix: Cast connparams on subscription update * Fix: indent issue by accident * fix: Fix lint errors * fix: Check for None variable before cast the dict * Add fragment * Update changelogs/fragments/285-postgresql_subscription_fix_idempontece.yml Co-authored-by: Andrew Klychkov <[email protected]> Co-authored-by: Andrew Klychkov <[email protected]> (cherry picked from commit cf4eee2) Co-authored-by: Javier <[email protected]>
Happy to help! |
SUMMARY
Fixes #280.
postgresql_subscription
module is not idempotent because the port is cast toint
in the following chunk of code( 335):On line 385 the if condition always return false because variable
connparams
is a dict of stringISSUE TYPE
COMPONENT NAME
postgresql_subscription
ADDITIONAL INFORMATION