Skip to content

actually use unwrapped config_hash value - #697

Merged
kBite merged 3 commits into
voxpupuli:masterfrom
kBite:fix-sensitive
Jul 16, 2025
Merged

actually use unwrapped config_hash value#697
kBite merged 3 commits into
voxpupuli:masterfrom
kBite:fix-sensitive

Conversation

@kBite

@kBite kBite commented Jul 15, 2025

Copy link
Copy Markdown
Contributor

Sensitive support was added 2022 with #614, but somehow nobody noticed yet. Passing $config_hash as Sensitive[Hash] fails ...

Internal Server Error: org.jruby.exceptions.RuntimeError: (PreformattedError) Evaluation Error: Error while evaluating a Function Call, deep_merge: unexpected argument type Puppet::Pops::Types::PSensitiveType::Sensitive, only expects hash arguments

... because $config_hash_real does not actually use the unwrapped config_hash value.

@TheMeier

Copy link
Copy Markdown
Contributor

A small test case for that would be nice for the future, would have caught that issue if it did exist.

@kBite

kBite commented Jul 15, 2025

Copy link
Copy Markdown
Contributor Author

I was searching instructions for how to run tests before. Now I found them: puppet-consul/.github/CONTRIBUTING.md.

Why are they in .github/ and not module root?

@kBite

kBite commented Jul 15, 2025

Copy link
Copy Markdown
Contributor Author

@TheMeier The test covers the Internal Server Error: described above. Running the same test against the master branch results in (e.g.)

  10) consul on almalinux-9-x86_64 When passing "config_hash" as Sensitive is expected to compile into a catalogue without dependency cycles
      Failure/Error: it { is_expected.to compile.with_all_deps }
        error during compilation: Evaluation Error: Error while evaluating a Function Call, deep_merge: unexpected argument type Puppet::Pops::Types::PSensitiveType::Sen
        sitive, only expects hash arguments (file: /tmp/puppet-consul/spec/fixtures/modules/consul/manifests/init.pp, line: 161, column: 23) on node localhost

Comment thread manifests/install.pp

@maxadamo maxadamo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks good to me

@kBite
kBite merged commit c992bd0 into voxpupuli:master Jul 16, 2025
50 checks passed
@kBite
kBite deleted the fix-sensitive branch July 16, 2025 15:34
@kBite

kBite commented Jul 16, 2025

Copy link
Copy Markdown
Contributor Author

Thanks

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.

4 participants