-
Notifications
You must be signed in to change notification settings - Fork 579
(MODULES-3393) Deprecation - Use puppet stacktrace if available #693
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
Conversation
|
A previous PR (#685) was raised on this issue, however once it was merged it was discovered that Puppet 3 with future parser enabled was calling the Puppet 4 version of the deprecation function. The Puppet stacktrace is not available until Puppet 4.6, so this was breaking existing setups. The solution was to check is the stacktrace was defined, and if it was to use it as part of the message output. |
|
Please put the info into the commit message, so it is also available offline. |
lib/puppet/functions/deprecation.rb
Outdated
| line = stacktrace[1] | ||
| output_message = "#{message} at #{file}:#{line}" | ||
| else | ||
| output_message = message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you need to use output_message in the failure msg and deprecation warning msg below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true. as I said on the original PR, re-using the message var would obviate the need to modify the code below, and - in this case - also remove the need fo the else.
5ca7207 to
be54a4f
Compare
A previous PR (puppetlabs#685) was raised on this issue, however once it was merged it was discovered that Puppet 3 with future parser enabled was calling the Puppet 4 version of the deprecation function. The Puppet stacktrace is not available until Puppet 4.6, so this was breaking existing setups. The solution was to check is the stacktrace was defined, and if it was to use it as part of the message output.
be54a4f to
746c1f8
Compare
DavidS
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline, this needs more work.
7295423 to
75e59d3
Compare
75e59d3 to
e501cb1
Compare
No description provided.