sensu / sensu-go-chef

Chef Library Cookbook for Sensu Go
https://sensu.io
MIT License
11 stars 22 forks source link

Fix yaml rendering and travis ci for latest Chef 16.x #108

Closed webframp closed 3 years ago

webframp commented 3 years ago

Upstream chef/chef introduced changes that broke default .to_yaml behavior used in agent and backend resources.

As discussed in the related issues using YAML.dump will ensure the library autoloads correctly. Switched to this method instead of using requires for consistency.

fixes #104

refs:


Pull Request Checklist

Is this in reference to an existing issue?

Yes. Fixes #104

General

Purpose

Fix issues with latest Chef 16.x releases

Known Compatibility Issues

None

webframp commented 3 years ago

Build is failing because of a travis issue it looks like, tests pass locally. Possibly related to https://github.com/travis-ci/travis-ci/issues/8720

Not fighting with travis tonight. Will let this sit and see if it persists.

majormoses commented 3 years ago

That sounds like we need to add their key for apt to accept it. Have we tried this? https://docs.chef.io/packages/#debian--ubuntu

webframp commented 3 years ago

That sounds like we need to add their key for apt to accept it. Have we tried this? https://docs.chef.io/packages/#debian--ubuntu

I figured, although we didn't have to do that previously I thought. Will update the config on this PR

webframp commented 3 years ago

Tested the chef instructions locally using docker ubuntu:18:04 https://docs.chef.io/packages/#debian--ubuntu and get:

E: The repository 'https://packages.chef.io/repos/apt/current bionic Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Strange that we have never hit this before. Going to test using https://docs.chef.io/packages/#chef-software-install-script install method in CI env

webframp commented 3 years ago

@majormoses fixed here.

I left it out but we should probably remove foodcritic from ci in the future per https://blog.chef.io/goodbye-foodcritic/

webframp commented 3 years ago

Squashed the in between commits while testing CI adjustments

webframp commented 3 years ago

Don't usually like to merge my own stuff, but I'll merge this one since it fixes broken travis ci and Chef 16 compatibility.

webframp commented 3 years ago

fyi @cwjohnston @calebhailey

majormoses commented 3 years ago

released: https://supermarket.chef.io/cookbooks/sensu-go/versions/1.2.0

calebhailey commented 3 years ago

Thanks, @webframp

calebhailey commented 3 years ago

Thank you too @majormoses 🙌