Skip to content

Improve viewer class (fully qualify ht_crypt, add tests & pdk update) #58

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

Closed
wants to merge 20 commits into from

Conversation

DLeich
Copy link

@DLeich DLeich commented Mar 16, 2022

The viewer class was failing to compile when used on puppet 7. This is because the ht_crypt function usage needed to be fully qualified. While I was fixing this, I figured I might as well also add a basic spec test, which also required running pdk update.

@DLeich
Copy link
Author

DLeich commented Apr 11, 2022

Hey folks - Just prodding this PR here. Without the changes proposed in this PR, the viewer class is broken on modern versions of Puppet.

@SimonHoenscheid
Copy link
Member

@DLeich The repo just migrated to Voxpupuli. Lets give this PR the love it deserves :-)

bastelfreak and others added 16 commits June 8, 2022 23:20
This is commented out and not required anymore.
The new HTTP client was introduced in
puppetlabs/puppet#7826. First released in
Puppet 6.11.0. The old HTTP client is deprecated. The new implementation
makes it quite easy to configure additional/custom TLS certificates. I
plan to implement that in another PR.
Previously if the only change in a class was a parameter's data type
from a `Float` to a `String`, then the class resource would be marked as
different, but
[str_diff](https://github.com/camptocamp/puppet-catalog-diff/blob/b7f3031e380502eb6154242b1710b9ab7c105b42/lib/puppet/catalog-diff/comparer.rb#L130)
would return `nil` causing a `Error: undefined method split' for nil:NilClass` error
[here](https://github.com/camptocamp/puppet-catalog-diff/blob/b7f3031e380502eb6154242b1710b9ab7c105b42/lib/puppet/catalog-diff/comparer.rb#L60)

Fixes voxpupuli#32
There is no benefit of calling `validate_encoding()` twice if the
checksums are equal. We can exit early.
Previously we called `validate_encoding()` to force the old/new strings
to be UTF8. Afterwards we exit if one (or both) of the strings are
`nil`. If they are actuall `nil`, `validate_encoding()` will fail.
Hence it makes sense to move the return statement above the
`validate_encoding()` calls.
@DLeich
Copy link
Author

DLeich commented Jun 9, 2022

I'm stuck in a loop trying to rebase this branch. I'm going to redo my changes fresh and open a new PR.

@SimonHoenscheid
Copy link
Member

@DLeich
Copy link
Author

DLeich commented Jun 17, 2022

Closing this and replacing with #88

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