puppetlabs / puppetlabs-node_manager

Create and manage PE node groups as resources.
Apache License 2.0
10 stars 21 forks source link

Implement `purge_behavior` parameter #60

Closed reidmv closed 3 years ago

reidmv commented 3 years ago

This allows for specifying classes or data keys that should be present or have defined values, without removing or modifying other data already present in the node group.

reidmv commented 3 years ago

@WhatsARanjit care to review?

reidmv commented 3 years ago

@WhatsARanjit does anyone else have merge access to this repo? If not, would you be open to designating a few people?

WhatsARanjit commented 3 years ago

@reidmv Sorry for being absent. This is fine with me, but can you whip up some corresponding tests for purging in different scenarios? Thanks.

reidmv commented 3 years ago

Sure, I'll take a stab at some basic tests. Will push an update when I have them.

reidmv commented 3 years ago

@WhatsARanjit a base set of tests implemented and pushed to PR. Waiting for Travis to complete; had to change the Gemfile to get a modern puppetlabs_spec_helper, waiting to see if it broke any of the other tests.

reidmv commented 3 years ago

@WhatsARanjit latest commit should fix the tests. I went through and updated the syntax of the small number of existing tests to use rspec mocks, rather than mocha, and unpinned some ancient gem versions. Tests should now pass.

reidmv commented 3 years ago

@WhatsARanjit thanks!! Do you think we could get a new module release with this feature? 🙂

reidmv commented 3 years ago

@WhatsARanjit ping

Btw, there's some neat Forge publish automation a colleague did a short bit ago that lets you auto-update the metadata.json file with a new version number, commit it, update the release tag, and push to the Forge all through a Github Action. Details here. It makes releasing a new version as easy as creating a new release in the Github UI.

WhatsARanjit commented 3 years ago

Good to go! Thanks @reidmv

https://forge.puppet.com/modules/WhatsARanjit/node_manager/0.7.4

reidmv commented 3 years ago

W00t!!! Awesome, thanks @WhatsARanjit!! 😄