Skip to content

Finish conversion of postgresql_escape function #1162

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

Conversation

alexjfisher
Copy link
Collaborator

In #1129 the 3
functions from this module were ported to the modern function API and
namespaced. None of the boilerplate was fixed up, tests weren't
updated, documentation wasn't updated etc.

This commit finishes the work for the postgresql_escape function.

  • Remove old API puppet/parser/functions version.
  • Create a replacement non-namespaced, (but deprecated), new API shim
    that calls the namespaced version. This function is probably not
    being used outside of this module, but it doesn't hurt to get the old
    version around for now.
  • Replace argument validation in the function code with data-type based
    validation for the individual function parameters.
  • Refactor function for increased readability.
  • Test both shim and namespaced version of the function.
  • Update postgresql::server to use namespaced version.
  • Update REFERENCE.md

@alexjfisher alexjfisher requested a review from a team as a code owner April 14, 2020 13:40
@alexjfisher alexjfisher force-pushed the finish_postgresql_escape_conversion branch from c4f69ab to 51e7fab Compare April 14, 2020 13:43
@daianamezdrea
Copy link
Contributor

Hi @alexjfisher, you have some conflicting files here. Could you rebase ?

In puppetlabs#1129 the 3
functions from this module were ported to the modern function API and
namespaced.  None of the boilerplate was fixed up, tests weren't
updated, documentation wasn't updated etc.

This commit finishes the work for the `postgresql_escape` function.

* Remove old API puppet/parser/functions version.
* Create a replacement non-namespaced, (but deprecated), new API shim
  that calls the namespaced version. This function is *probably* not
  being used outside of this module, but it doesn't hurt to get the old
  version around for now.
* Replace argument validation in the function code with data-type based
  validation for the individual function parameters.
* Refactor function for increased readability.
* Test both shim and namespaced version of the function.
* Update `postgresql::server` to use namespaced version.
* Update REFERENCE.md
@alexjfisher alexjfisher force-pushed the finish_postgresql_escape_conversion branch from 51e7fab to 788aad6 Compare April 22, 2020 18:30
@alexjfisher
Copy link
Collaborator Author

@daianamezdrea Rebased (which was needed following merging of my other PRs).

@daianamezdrea
Copy link
Contributor

@alexjfisher, I think is my fault. Thank you again for your contribution !

@daianamezdrea daianamezdrea merged commit ced3a74 into puppetlabs:master Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants