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

Fix the postgresql::postgresql_password() function #1529

Merged
merged 1 commit into from Oct 12, 2023

Conversation

smortex
Copy link
Collaborator

@smortex smortex commented Oct 11, 2023

The changes in #1512 introduced a regression when a hash value is not
explicitly passed:

Puppet Server Error: Evaluation Error: Error while evaluating a Function Call, failed to coerce org.jruby.RubySymbol to java.lang.String

Fixes #1528

The changes in #1512 introduced a regression when a hash value is not
explicitly passed:

```
Puppet Server Error: Evaluation Error: Error while evaluating a Function Call, failed to coerce org.jruby.RubySymbol to java.lang.String
```

Fixes #1528
@bastelfreak
Copy link
Collaborator

@smortex thanks for the fix, I noticed the error as well. Any chance you can add an easy test for it?

@smortex
Copy link
Collaborator Author

smortex commented Oct 11, 2023

@smortex thanks for the fix, I noticed the error as well. Any chance you can add an easy test for it?

Not sure how to do this given call_function belongs to Puppet itself. Do you have an idea how we can improve this (other that adding checks on the Puppet side)?

Also while investigating this I found another bug, which I am working on ATM. Don't release a 10.0.1 too soon 🙃 !

@smortex
Copy link
Collaborator Author

smortex commented Oct 11, 2023

@smortex thanks for the fix, I noticed the error as well. Any chance you can add an easy test for it?

Also there is already extensive testing of the postgresql::postgresql_password() function where the call without explicit hash does not fail. Maybe some code run by jruby fail but the bad behavior is not triggered by MRI 🤷? I have not found how to reproduce this outside of the context of puppetserver compiling a catalog.

@smortex smortex changed the title Fix the postgresql::postgresql_password() function Fix the postgresql::postgresql_password() function Oct 11, 2023
@kenyon
Copy link
Contributor

kenyon commented Oct 12, 2023

I still get this error with this PR's branch, is that the other bug you found @smortex?

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: no parameter named 'instance' (file: /etc/puppetlabs/code/environments/production/modules/postgresql/manifests/server/extension.pp, line: 83) on Postgresql_psql[puppetdb: CREATE EXTENSION "pg_trgm"] (file: /etc/puppetlabs/code/environments/production/modules/postgresql/manifests/server/extension.pp, line: 83) on node lithium.kenyonralph.com

@kenyon
Copy link
Contributor

kenyon commented Oct 12, 2023

Ah nevermind, just needed to run sudo puppet generate types (non-PE). Need to add that to my regular deploy command.

@Ramesh7 Ramesh7 merged commit f2f2754 into main Oct 12, 2023
41 checks passed
@Ramesh7 Ramesh7 deleted the fix-postgresql_password branch October 12, 2023 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: postgresql::postgresql_password() broken on 10.0.0
6 participants