Merged
Conversation
This commit adds the method `Puppet::Module#parse_range` which in turn calls `SemanticPuppet::VersionRange#parse` and ensures that all calls from `Puppet::Module` and `Puppet::ModuleTool` uses that method instead of calling directly.
This commit adds an arity check to be able to call the method `SemanticPuppet::VersionRange#parse` with one or two arguments from the `Puppet::Module#parse_range` method. When the arity is found to be just 1, a check is made if the gem version of the semantic_puppet gem is < 1.0.0, in which case it is assumed that the parse method is incapable of creating a range that adheres to strict semantics. A warning is logged if a request for a strict range is made. Conversely, if the gem version is >=1.0.0, it is assumed that strict semantics will be honored and a warning is issued if a request for a non-strict range is made.
Before this commit, a created `Puppet::Forge` instance would not know the setting of `strict_semver`. This made parts of the dependency resolution use strict semantics. This commit ensures that the setting is known to `Puppet::Forge` and propagated to the created `ModuleRelease` instances when processing a dependency tree.
It appears that the while the unit test for the `search` face that tested if the option `:module_repository` was accepted, it did not check if it was also propagated to the `Puppet::Forge` instance. It wasn't, and as a consequence, the test failed when the default repository was propagated in an attempt to simulate the default argument assignment when passing no arguments to `Puppet::Forge#new`. This commit therefore fixes two things: 1. It ensures that the `:module_repository` option is propagated when the `Puppet::Forge` is instantiated. 2. It updates the test to check that the correct repository is propagated when the instance is created.
Prior to this commit, the method `Puppet::ModuleTool#set_default_options` would set the `:strict_semver` option to `false` even though it had already been assigned a value. This commit ensures that the given value is retained and adds tests to assert that.
This adds to Puppet::Module to "initialize" a module for translations. Each module must be added to FastGettext.translation_repositories, so that translations in the modules code will be available to Puppet. Two methods are added here, one to check if a module has been initialized and another to initialize. To initialize, we are just wrapping GettextSetup.initialize basically.
In some cases, it's desirable to make the user aware of potential issues that may or may not cause a problem. This commit makes it possible to use the `warn_once` method to log such problems with a different log-level than `:warning`.
This commit changes the messages that are logged when the setting of `strict_semver` cannot be honored by the `semantic_puppet` implementation so that they are logged using `:notice` instead of `:warning`.
Adds ability to pass `:default` instead of `nil` for the file and line arguments passed to `#warn_once`. When passing :default for both arguments, the output "file & line not available" is suppressed.
This updates Puppet's version number for the upcoming 5.0.1 release.
(PUP-7518) i18n module loading
…k-range-parse-arity (PUP-7738) Ensure that Puppet can be used with semantic_puppet gem.
This commit bumps Puppet's version to 4.10.5 in preparation for the puppet-agent 1.10.5 release.
(packaging) Bump version to 5.0.1
(packaging) Bump version to 4.10.5
On the new Linux Power8 system the "facter fqdn" did not match the agent.hostname, this caused these tests to fail. This fixes them to use the real fqdn value whether its the short or long name (This will also fix other vmpooler systems that have the same issue with these tests)
(PUP-7684) correct tests to use the real fqdn of the host
Prior to this commit, all global lookups would be affected by the `data_binding_terminus` setting. This commit ensures that this is no longer the case when the lookup origins from a `hiera`, `hiera_array`, `hiera_hash`, or `hiera_include` function. The change is made to ensure backward compatibility with Hiera 3 where the `hiera_xxx` calls would go directly to the classic Hiera and thus not be affected by the `data_binding_terminus`.
…ra_xxx-data_binding_terminus (PUP-7802) Make hiera_xxx functions unaffected by data_binding_terminus
* puppet/4.10.x: (PUP-7802) Make hiera_xxx functions unaffected by data_binding_terminus (PUP-7684) correct tests to use the real fqdn of the host (packaging) Bump version to 4.10.5 (packaging) Updating POT file for d9d2edc (PUP-7518) i18n module loading
Merge 4.10.x -> 5.0.x
* puppet/5.0.x: (PUP-7802) Make hiera_xxx functions unaffected by data_binding_terminus (PUP-7684) correct tests to use the real fqdn of the host (packaging) Bump version to 4.10.5 (packaging) Updating POT file for 7f53ea2 (packaging) Updating POT file for d9d2edc (packaging) Bump version to 5.0.1 (PUP-7738) Drop text "file & line not available" from notices (PUP-7738) Notice instead of warn when --strict_semver does not comply (PUP-7738) Add ability to warn_once with alternate log levels (PUP-7518) i18n module loading (PUP-7738) Ensure that option :strict_semver is propagated correctly (PUP-7738) Ensure that option :module_repository is propagated in Search (PUP-7738) Ensure that strict_semver is known to created Forge instances (PUP-7738) Ensure that Puppet can be used with semantic_puppet gem. (PUP-7738) Converge all module-tool VersionRange#parse calls
joshcooper
approved these changes
Aug 1, 2017
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.
No description provided.