(PUP-8767) Emit config version as a string#6856
Merged
joshcooper merged 3 commits intopuppetlabs:5.5.xfrom Jun 5, 2018
Merged
Conversation
6a246be to
061b566
Compare
If you run puppet apply --config_version='echo foo' then the last run summary YAML ends up looking like this --- version: config: !ruby/string:Puppet::Util::Execution::ProcessOutput "foo" [...] Stringify the process output in order to make the YAML less dependent on Ruby.
Add a test to ensure config_version is a string and is not a ProcessOutput which subclasses String.
Return a ProcessOutput object to match what the execute method actually does.
061b566 to
913321d
Compare
|
CLA signed by all contributors. |
rhowe-gds
reviewed
May 26, 2018
| @@ -208,7 +208,7 @@ def version | |||
| if environment.config_version.nil? || environment.config_version == "" | |||
| @version = Time.now.to_i | |||
Contributor
There was a problem hiding this comment.
Should this be to_s as well, just for consistency's sake?
Contributor
Author
There was a problem hiding this comment.
We allow either string or integer in the schema, so I think it's ok as is.
jhelwig
approved these changes
May 29, 2018
Contributor
Author
|
Thanks for your contribution @rhowe-gds! This will be released in the near future in the 5.5.x series. |
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.
If
config_versionwas an executable, then we emitted the YAML tag for aPuppet::Util::Execution::ProcessOutputclass in the last run summary. Capture the config version output as a String instead. Also update specs to accurate reflect what theexecutemethod returns.