Skip to content
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

(PDK-1434) Gracefully handle unparsable bolt analytics config #705

Merged
merged 1 commit into from
Jul 12, 2019

Conversation

rodjek
Copy link
Contributor

@rodjek rodjek commented Jul 11, 2019

This issue was found because the classroom Windows instances created the
~/puppetlabs/bolt/analytics.yaml manually with UTF-16LE encoding which
Psych on Windows is unable to parse, causing
PDK::Config.bolt_analytics_config to raise PDK::Config::LoadError.

The classroom bootstrap scripts have been fixed to generate the file as
UTF-8 now, but we should still gracefully handle this case and have PDK
behave as if the file doesn't exist and use the default values.

@rodjek rodjek requested a review from glennsarti July 11, 2019 01:32
lib/pdk/config.rb Show resolved Hide resolved
spec/unit/pdk/config_spec.rb Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Jul 11, 2019

Coverage Status

Coverage increased (+0.006%) to 93.096% when pulling 88d1cc6 on rodjek:pdk-1434 into 8177b43 on puppetlabs:master.

This issue was found because the classroom Windows instances created the
`~/puppetlabs/bolt/analytics.yaml` manually with UTF-16LE encoding which
Psych on Windows is unable to parse, causing
`PDK::Config.bolt_analytics_config` to raise `PDK::Config::LoadError`.

The classroom bootstrap scripts have been fixed to generate the file as
UTF-8 now, but we should still gracefully handle this case and have PDK
behave as if the file doesn't exist and use the default values.
@glennsarti glennsarti merged commit 26e42f7 into puppetlabs:master Jul 12, 2019
@rodjek rodjek added bug and removed bug labels Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants