Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: puppetlabs/puppetlabs-postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v10.0.0
Choose a base ref
...
head repository: puppetlabs/puppetlabs-postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v10.0.1
Choose a head ref
  • 7 commits
  • 5 files changed
  • 3 contributors

Commits on Oct 11, 2023

  1. Fix the postgresql::postgresql_password() function

    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
    smortex committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    608d8d7 View commit details
    Browse the repository at this point in the history
  2. Fix postgresql::default() return value for unknown parameters

    When calling `postgresql::default()` with a name that has no corresponding
    parameter, the function returns the string
    "postgresql::globals::<parameter-name>" which is probably not intended
    given the comment above the code.
    
    The usage of pick seems to indicate that an exception should be raised
    when a parameter is not found in `params` nor `globals.pp`, so adjust
    the code accordingly.
    smortex committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    6cb50cb View commit details
    Browse the repository at this point in the history
  3. Simplify postgresql::default()

    `postgresql::params` inherits from `postgresql::globals` so any variable
    defined in `postgresql::globals` can be accessed by reading it from
    `postgresql::params`, making it redundant to check both.
    diff --git a/functions/default.pp b/functions/default.pp
    index e36610b..41b5006 100644
    --- a/functions/default.pp
    +++ b/functions/default.pp
    @@ -8,8 +8,7 @@ function postgresql::default(
     ) {
       include postgresql::params
    
    -  #search for the variable name in params first
    -  #then fall back to globals if not found
    -  pick(getvar("postgresql::params::${parameter_name}"),
    -       getvar("postgresql::globals::${parameter_name}"))
    +  # Search for the variable name in params.
    +  # params inherits from globals, so it will also catch these variables.
    +  pick(getvar("postgresql::params::${parameter_name}"))
     }
    smortex committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    4e15857 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2023

  1. Merge pull request #1529 from puppetlabs/fix-postgresql_password

    Fix the `postgresql::postgresql_password()` function
    Ramesh7 authored Oct 12, 2023
    Configuration menu
    Copy the full SHA
    f2f2754 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #1530 from puppetlabs/fix-postgresql_default

    Fix `postgresql::default()` return value for unknown parameters
    Ramesh7 authored Oct 12, 2023
    Configuration menu
    Copy the full SHA
    e1c3a24 View commit details
    Browse the repository at this point in the history
  3. Release prep v10.0.1

    GitHub Actions committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    4bdd511 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #1531 from puppetlabs/release-prep

    Release prep v10.0.1
    Ramesh7 authored Oct 12, 2023
    Configuration menu
    Copy the full SHA
    05bc715 View commit details
    Browse the repository at this point in the history
Loading