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

(PA-5781) Use Beaker 5 in puppetlabs-augeas_core #74

Merged
merged 2 commits into from
Feb 15, 2024

Conversation

AriaXLi
Copy link
Contributor

@AriaXLi AriaXLi commented Feb 12, 2024

No description provided.

@AriaXLi AriaXLi requested a review from a team as a code owner February 12, 2024 22:41
Gemfile Show resolved Hide resolved
This commit updates .sync.yml and Gemfile to use newer beaker dependencies:
beaker 5.x
beaker-abs 1.x
beaker-puppet 3.x

This commit also removes beaker-pe.
Previously, when running with beaker 5 and latest beaker-puppet, tests failed
with:

    cannot add defaults of type pe for host redhat7-64-1 (add_pe_defaults_on not present)

The error came from beaker-puppet when it tried to configure the host as a PE
agent[1].

The root cause is beaker defaults its options to `pe`[2]. When `beaker-puppet`
calls the `configure_type_defaults_on` method, it calls the appropriate
`add_<type>_defaults_on` method. This works when using beaker 4 as `beaker-pe`
is pulled in as a dependency and its `add_pe_defaults_on` method[3] is included
into the tests.

However, when running with beaker5, beaker-pe is not loaded, so the method is
undefined. It appears beaker-puppet_install_helper is responsible for the
whether beaker-pe is loaded or not, but only when using
beaker-puppet_install_helper 0.9.4.

Since these tests don't actually depend on PE, drop beaker-pe, require
'beaker-puppet' directly (so the install_from_build_data_url method exists) and
configure the host type directly.

[1] https://github.com/puppetlabs/beaker-puppet/blob/7175b5c1acb5cddb3a31ddcc114f09cddd3b83d0/lib/beaker-puppet/install_utils/puppet_utils.rb#L167
[2] https://github.com/voxpupuli/beaker/blob/c61ee381d3801bad70989d9b3cbf970771e6f330/lib/beaker/options/presets.rb#L139
[3] https://github.com/puppetlabs/beaker-pe/blob/3bfe913b8d57c805cc0c51ae899fff174224d5f5/lib/beaker-pe/install/pe_defaults.rb#L93

Commit originally from joshcooper/puppetlabs-cron_core@d456d2a
@mhashizume mhashizume merged commit 433594e into puppetlabs:main Feb 15, 2024
14 checks passed
@mhashizume mhashizume added the maintenance Maintenance chores are typically excluded from changelogs label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance chores are typically excluded from changelogs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants