Improve viewer class (fully qualify ht_crypt, add tests & pdk update)#58
Closed
DLeich wants to merge 20 commits intovoxpupuli:masterfrom
Closed
Improve viewer class (fully qualify ht_crypt, add tests & pdk update)#58DLeich wants to merge 20 commits intovoxpupuli:masterfrom
DLeich wants to merge 20 commits intovoxpupuli:masterfrom
Conversation
Author
|
Hey folks - Just prodding this PR here. Without the changes proposed in this PR, the viewer class is broken on modern versions of Puppet. |
Member
|
@DLeich The repo just migrated to Voxpupuli. Lets give this PR the love it deserves :-) |
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.
Author
|
I'm stuck in a loop trying to rebase this branch. I'm going to redo my changes fresh and open a new PR. |
Member
|
@DLeich Maybe https://chuva-inc.com/blog/fast-tip-enable-git-rerere-right-now |
Author
|
Closing this and replacing with #88 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.