Topics

Beaker 3 to Beaker 4 migration for puppet modules.

Tp Honey
 

Hi,
    as you may be aware there was a release of Beaker 4 gem in the last week, here are some proof of concept PR's for puppet modules that show the necessary code changes and the dependency changes required for this migration. 
The Beaker team have detailed the technicalities of these beaker changes here Upgrade_from_3_to_4
Longer term we are going to put these changes into puppet-module-gems pinning first to beaker 3 then moving to beaker 4 for supported puppet modules. 

Please feel free to reach out if you have further questions.

Thanks
TP Honey

Ewoud Kohl van Wijngaarden <ewoud@...>
 

On Wed, Aug 15, 2018 at 05:45:03PM +0100, Tp Honey wrote:
as you may be aware there was a release of Beaker 4 gem in the last
week
I appreciate the thread, but was there a place I could have gotten a heads up of such a major bump before the actual release?

here are some proof of concept PR's for puppet modules that show the
necessary code changes and the dependency changes required for this
migration.
puppetlabs-stdlib PR
<https://github.com/puppetlabs/puppetlabs-stdlib/pull/937> and puppetlabs-apt
PR <https://github.com/puppetlabs/puppetlabs-apt/pull/779>
The Beaker team have detailed the technicalities of these beaker changes
here Upgrade_from_3_to_4
<https://github.com/puppetlabs/beaker/blob/4.0.0/docs/how_to/upgrade_from_3_to_4.md>
The links to beaker-* are incorrect, https://github.com/puppetlabs/beaker/pull/1541 should fix them.

Longer term we are going to put these changes into puppet-module-gems
<https://github.com/puppetlabs/puppet-module-gems> pinning first to beaker
3 then moving to beaker 4 for supported puppet modules.

Please feel free to reach out if you have further questions.
In my experience it's very hard to find documentation on beaker. For example, it took a long time before I figured out that serverspec[1] is used and well documented.

A high level overview of how it works and how I use it as a developer writing specs would be greatly appreciated.

[1]: https://serverspec.org/

Tp Honey
 

Thanks for the feedback, first and foremost. 
I will try to answer this as best I can. 
The release of beaker 4 was not publicised enough, and we are working internally on improving this. No harm was meant with the release, and we do not want this to happen again. There are beaker announcements here https://groups.google.com/forum/#!forum/puppet-beaker  It was announced that a major version release would be upcoming in the previous minor release, with one month lead time: https://groups.google.com/forum/#!topic/puppet-beaker/U_4vhwjav7o We then announced the major version release: https://groups.google.com/forum/#!topic/puppet-beaker/zuTHYq0FluA. However it is clear that this was not enough. 

For the modules team at puppet, it highlights an issue that we need to be careful on how we pin dependencies and have proper upper bounds set. We have work in flight that will make changes to puppet-module-gems to include beaker, with strict version bounding. 

The use of beaker has grown in scope usage in (multiple projects) and in terms of depth (features) Agreed that we need to improve documentation around its use and development.
Writing acceptance tests is hard, unfortunately the best way to figure it all out, is by mimicry. Looking at existing modules is a non-ideal way to learn the tricks of provisioning / setup / tests / tear down. But it is extensive. The puppet supported modules, extensively use beaker / beaker-rspec. We now use travis-ci with docker images of popular distributions to ensure that pr's are good to merge. It does work well. What would help most, documentation around the individual components. Or a guide on how to setup a module for acceptance tests. Or how to write a good acceptance test.

Apologies again, and thank you for your patience. 
TP Honey

On Wed, 15 Aug 2018 at 18:22, Ewoud Kohl van Wijngaarden <ewoud@...> wrote:
On Wed, Aug 15, 2018 at 05:45:03PM +0100, Tp Honey wrote:
>    as you may be aware there was a release of Beaker 4 gem in the last
>week

I appreciate the thread, but was there a place I could have gotten a
heads up of such a major bump before the actual release?

> here are some proof of concept PR's for puppet modules that show the
>necessary code changes and the dependency changes required for this
>migration.
>puppetlabs-stdlib PR
><https://github.com/puppetlabs/puppetlabs-stdlib/pull/937>  and puppetlabs-apt
>PR <https://github.com/puppetlabs/puppetlabs-apt/pull/779>
>The Beaker team have detailed the technicalities of these beaker changes
>here Upgrade_from_3_to_4
><https://github.com/puppetlabs/beaker/blob/4.0.0/docs/how_to/upgrade_from_3_to_4.md>

The links to beaker-* are incorrect,
https://github.com/puppetlabs/beaker/pull/1541 should fix them.

>Longer term we are going to put these changes into puppet-module-gems
><https://github.com/puppetlabs/puppet-module-gems> pinning first to beaker
>3 then moving to beaker 4 for supported puppet modules.
>
>Please feel free to reach out if you have further questions.

In my experience it's very hard to find documentation on beaker. For
example, it took a long time before I figured out that serverspec[1] is
used and well documented.

A high level overview of how it works and how I use it as a developer
writing specs would be greatly appreciated.

[1]: https://serverspec.org/



Tp Honey
 

Hi,

Yesterday 0.3.9 of puppet-module-gems was released. This adds Beaker 3 as a dependency for system tests. The added dependencies have upper bounds to prevent future major releases of those gems from affecting modules. The Puppet supported modules have been updated to take advantage of this change. eg puppetlabs-stdlib 

Changes are being tested for moving to Beaker 4. There will be another release of puppet-module-gems, along with PR's to the supported puppet modules. 

Please feel free to reach out if you have any questions / comments.

Thanks


On Wed, 15 Aug 2018 at 17:45, Tp Honey <tp@...> wrote:
Hi,
    as you may be aware there was a release of Beaker 4 gem in the last week, here are some proof of concept PR's for puppet modules that show the necessary code changes and the dependency changes required for this migration. 
The Beaker team have detailed the technicalities of these beaker changes here Upgrade_from_3_to_4
Longer term we are going to put these changes into puppet-module-gems pinning first to beaker 3 then moving to beaker 4 for supported puppet modules. 

Please feel free to reach out if you have further questions.

Thanks
TP Honey

Tp Honey
 

Hi, 

The final phase of our migration to Beaker 4 for modules is complete. puppet-module-gems has been released and the Puppet supported modules have been updated.

We are aware of the difficulties around these changes and thank you for your continued patience. Internally we are still looking at these issues, including documentation, process changes and potential different approaches to using beaker. 

Please feel free to reach out with any questions  / comments.

Thanks.

On Wed, 22 Aug 2018 at 18:01, Tp Honey <tp@...> wrote:
Hi,

Yesterday 0.3.9 of puppet-module-gems was released. This adds Beaker 3 as a dependency for system tests. The added dependencies have upper bounds to prevent future major releases of those gems from affecting modules. The Puppet supported modules have been updated to take advantage of this change. eg puppetlabs-stdlib 

Changes are being tested for moving to Beaker 4. There will be another release of puppet-module-gems, along with PR's to the supported puppet modules. 

Please feel free to reach out if you have any questions / comments.

Thanks

On Wed, 15 Aug 2018 at 17:45, Tp Honey <tp@...> wrote:
Hi,
    as you may be aware there was a release of Beaker 4 gem in the last week, here are some proof of concept PR's for puppet modules that show the necessary code changes and the dependency changes required for this migration. 
The Beaker team have detailed the technicalities of these beaker changes here Upgrade_from_3_to_4
Longer term we are going to put these changes into puppet-module-gems pinning first to beaker 3 then moving to beaker 4 for supported puppet modules. 

Please feel free to reach out if you have further questions.

Thanks
TP Honey