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

Projects
None yet
3 participants
@rodjek
Copy link
Member

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 Jul 11, 2019

Show resolved Hide resolved lib/pdk/config.rb
Show resolved Hide resolved spec/unit/pdk/config_spec.rb
@coveralls

This comment has been minimized.

Copy link

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.

@rodjek rodjek force-pushed the rodjek:pdk-1434 branch from 205204b to 55d0660 Jul 11, 2019

(PDK-1434) Gracefully handle unparsable bolt analytics config
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 force-pushed the rodjek:pdk-1434 branch from 55d0660 to 88d1cc6 Jul 12, 2019

@glennsarti glennsarti merged commit 26e42f7 into puppetlabs:master Jul 12, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.006%) to 93.096%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.