Skip to content
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_script: new module #188

Merged
merged 11 commits into from
Feb 17, 2022

Conversation

Andersson007
Copy link
Collaborator

@Andersson007 Andersson007 commented Feb 10, 2022

SUMMARY

postgresql_script: new module - Runs SQL statements from a file.

Relates to the discussion in #180 (comment)

The rough plan is:

  • Release this module
  • Add a deprecation warning to the postgresql_query module about deprecation of the path_to_script and as_single_query options and related ret values. The warning will ask users to use the postgresql_script module
  • Update docs in the postgresql_query module
  • Announce the deprecation and removal in the next major release (6 months - 1 year)

In this PR:

  • Discuss module's interface
  • Cover stuff with CI (and maybe unit tests)
  • Ask folks for manual testing

After releasing

  • Move functions shared between postgresql_query and postgresql_script to module_utils/postgres.py and import them from there.
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

postgresql_script

@Andersson007 Andersson007 changed the title postgresql_script: new module [WIP] postgresql_script: new module Feb 10, 2022
@Andersson007
Copy link
Collaborator Author

FYI: it's not ready for testing at the moment.

@Andersson007
Copy link
Collaborator Author

The next step is adding integration tests. I'll try to do it this-next week.

@Andersson007
Copy link
Collaborator Author

@hunleyd @tcraxs @DanScharon @jtelcontar
the DOCUMENTATION, EXAMPLES, and RETURN sections are mostly done. If you take a look and share your thoughts, it would be great!

plugins/modules/postgresql_script.py Outdated Show resolved Hide resolved
plugins/modules/postgresql_script.py Show resolved Hide resolved
plugins/modules/postgresql_script.py Outdated Show resolved Hide resolved
plugins/modules/postgresql_script.py Outdated Show resolved Hide resolved
plugins/modules/postgresql_script.py Outdated Show resolved Hide resolved
Andersson007 and others added 2 commits February 11, 2022 13:34
Co-authored-by: Douglas J Hunley <doug.hunley@gmail.com>
Co-authored-by: Douglas J Hunley <doug.hunley@gmail.com>
@Andersson007 Andersson007 changed the title [WIP] postgresql_script: new module postgresql_script: new module Feb 15, 2022
@Andersson007
Copy link
Collaborator Author

Andersson007 commented Feb 15, 2022

@hunleyd @tcraxs @DanScharon @jtelcontar the module and tests have been added and are ready for review.
Could you please:

  1. review the PR
  2. play with the module manually (if you don't have time/wish for that, please scrutinize the tests, see Files changed tab)
  3. give feedback, I'll be looking forward to it, AND/OR approve the PR
    Thanks:)

Copy link
Collaborator

@hunleyd hunleyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't have opportunity to pull it down and play with it, but visually it looks ok

@Andersson007 Andersson007 merged commit a810fce into ansible-collections:main Feb 17, 2022
@Andersson007
Copy link
Collaborator Author

@hunleyd thank you much for reviewing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants