-
Notifications
You must be signed in to change notification settings - Fork 56
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
Update to bolt 4 #579
Merged
Merged
Update to bolt 4 #579
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Gavin Didrichsen <gavin.didrichsen@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #579 +/- ##
=======================================
Coverage 63.86% 63.86%
=======================================
Files 6 6
Lines 761 761
=======================================
Hits 486 486
Misses 275 275 ☔ View full report in Codecov by Sentry. |
# verify that bolt is actually coming from puppet_litmus
➜ puppetlabs-motd git:(main) ✗ bundle plugin install bundler-why --source=https://rubygems.org
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching bundler-why 0.1.3
Installing bundler-why 0.1.3
Installed plugin bundler-why
➜ puppetlabs-motd git:(main) ✗ bundle why bolt
puppet_litmus -> bolt
➜ puppetlabs-motd git:(main) ✗ bundle exec bolt --version
4.0.0
# point puppet_litmus to latest bolt
➜ puppet_litmus git:(maint_update_bolt_to_4) ✗ git diff main..maint_update_bolt_to_4
diff --git a/puppet_litmus.gemspec b/puppet_litmus.gemspec
index ad729a0..a7d6092 100644
--- a/puppet_litmus.gemspec
+++ b/puppet_litmus.gemspec
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
EOF
spec.summary = 'Providing a simple command line tool for puppet content creators, to enable simple and complex test deployments.'
spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
- spec.add_runtime_dependency 'bolt', '~> 3.0'
+ spec.add_runtime_dependency 'bolt', '~> 4.0'
spec.add_runtime_dependency 'docker-api', '>= 1.34', '< 3.0.0'
spec.add_runtime_dependency 'parallel'
spec.add_runtime_dependency 'puppet-modulebuilder', '>= 0.3.0'
➜ puppet_litmus git:(maint_update_bolt_to_4) pwd
/Users/gavin.didrichsen/@REFERENCES/github/app/development/tools/puppet/repositories/puppetlabs/puppet_litmus_USAGE/puppet_litmus
➜ puppet_litmus git:(maint_update_bolt_to_4)
# re-point my module to point to the above puppet_litmus
➜ puppetlabs-motd git:(main) ✗ git diff
diff --git a/Gemfile b/Gemfile
index 2d8e160..8201862 100644
--- a/Gemfile
+++ b/Gemfile
@@ -41,7 +41,7 @@ group :development, :release_prep do
gem "puppetlabs_spec_helper", '~> 7.0', require: false
end
group :system_tests do
- gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw]
+ gem "puppet_litmus", path: '/Users/gavin.didrichsen/@REFERENCES/github/app/development/tools/puppet/repositories/puppetlabs/puppet_litmus_USAGE/puppet_litmus'
gem "CFPropertyList", '< 3.0.7', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "serverspec", '~> 2.41', require: false
end
➜ puppetlabs-motd git:(main) ✗
# provision some docker containers
➜ puppetlabs-motd git:(main) ✗ bundle exec rake 'litmus:provision[docker, litmusimage/debian:12]'
I, [2024-12-10T12:46:41.214145 #43223] INFO -- : Creating symlink from spec/fixtures/modules/motd to /Users/gavin.didrichsen/@REFERENCES/github/app/development/tools/puppet/repositories/puppetlabs/puppet_litmus_USAGE/puppetlabs-motd
Cloning into 'spec/fixtures/modules/facts'...
Cloning into 'spec/fixtures/modules/provision'...
Cloning into 'spec/fixtures/modules/stdlib'...
Cloning into 'spec/fixtures/modules/puppet_agent'...
Cloning into 'spec/fixtures/modules/registry'...
remote: Enumerating objects: 73, done.
remote: Counting objects: 100% (73/73), done.
remote: Compressing objects: 100% (58/58), done.
remote: Enumerating objects: 471, done.
remote: Enumerating objects: 89, done.
…
…
➜ puppetlabs-motd git:(main) ✗ bundle exec rake 'litmus:provision[docker,litmusimage/ubuntu:22.04]'
HEAD is now at d38f4f5 Merge pull request #735 from puppetlabs/release-prep
[-] Provisioning litmusimage/ubuntu:22.04 using docker provisioner.Successfully provisioned litmusimage/ubuntu:22.04 using docker
Checking connectivity for ["localhost:52739"]
[\] Provisioning litmusimage/ubuntu:22.04 using docker provisioner.Connectivity check PASSED.
[✔] Provisioning litmusimage/ubuntu:22.04 using docker provisioner.
ae77bba00216, litmusimage/ubuntu:22.04
# install agent
➜ puppetlabs-motd git:(main) ✗ bundle exec rake litmus:install_agent
install_agent
HEAD is now at d38f4f5 Merge pull request #735 from puppetlabs/release-prep
# verify inventory
➜ puppetlabs-motd git:(main) ✗ cat spec/fixtures/litmus_inventory.yaml
---
version: 2
groups:
- name: ssh_nodes
targets:
- uri: localhost:52938
alias: localhost:52938
config:
transport: ssh
ssh:
user: root
password: root
port: 52938
host-key-check: false
connect-timeout: 120
facts:
provisioner: docker
platform: litmusimage/debian:12
os-release:
PRETTY_NAME: Debian GNU/Linux 12 (bookworm)
NAME: Debian GNU/Linux
VERSION_ID: '12'
VERSION: 12 (bookworm)
VERSION_CODENAME: bookworm
ID: debian
HOME_URL: https://www.debian.org/
SUPPORT_URL: https://www.debian.org/support
BUG_REPORT_URL: https://bugs.debian.org/
container_id: e508e38a776f
name: e508e38a776f
features:
- puppet-agent
- uri: localhost:52739
alias: localhost:52739
config:
transport: ssh
ssh:
user: root
password: root
port: 52739
host-key-check: false
connect-timeout: 120
facts:
provisioner: docker
platform: litmusimage/ubuntu:22.04
os-release:
PRETTY_NAME: Ubuntu 22.04.5 LTS
NAME: Ubuntu
VERSION_ID: '22.04'
VERSION: 22.04.5 LTS (Jammy Jellyfish)
VERSION_CODENAME: jammy
ID: ubuntu
ID_LIKE: debian
HOME_URL: https://www.ubuntu.com/
SUPPORT_URL: https://help.ubuntu.com/
BUG_REPORT_URL: https://bugs.launchpad.net/ubuntu/
PRIVACY_POLICY_URL: https://www.ubuntu.com/legal/terms-and-policies/privacy-policy
UBUNTU_CODENAME: jammy
container_id: ae77bba00216
name: ae77bba00216
features:
- puppet-agent
# verify command
➜ puppetlabs-motd git:(main) ✗ bundle exec bolt command run 'puppet --version' --targets localhost:52739 --inventoryfile spec/fixtures/litmus_inventory.yaml
Bolt might be installed as a gem. To use Bolt reliably and with all of its
dependencies, uninstall the 'bolt' gem and install Bolt as a package:
https://puppet.com/docs/bolt/latest/bolt_installing.html
If you meant to install Bolt as a gem and want to disable this warning,
set the BOLT_GEM environment variable. [ID: gem_install]
Started on ae77bba00216...
Finished on ae77bba00216:
7.34.0
Successful on 1 target: ae77bba00216
Ran on 1 target in 2.03 sec
# install the puppetlabs-motd module
➜ puppetlabs-motd git:(main) ✗ bundle exec rake litmus:install_module
Building '/Users/gavin.didrichsen/@REFERENCES/github/app/development/tools/puppet/repositories/puppetlabs/puppet_litmus_USAGE/puppetlabs-motd' into '/Users/gavin.didrichsen/@REFERENCES/github/app/development/tools/puppet/repositories/puppetlabs/puppet_litmus_USAGE/puppetlabs-motd/pkg'
Built '/Users/gavin.didrichsen/@REFERENCES/github/app/development/tools/puppet/repositories/puppetlabs/puppet_litmus_USAGE/puppetlabs-motd/pkg/puppetlabs-motd-7.1.0.tar.gz'
Installed '/Users/gavin.didrichsen/@REFERENCES/github/app/development/tools/puppet/repositories/puppetlabs/puppet_litmus_USAGE/puppetlabs-motd/pkg/puppetlabs-motd-7.1.0.tar.gz' on localhost:52938, localhost:52739
# verify the module listing
➜ puppetlabs-motd git:(main) ✗ bundle exec bolt command run 'puppet module list' --targets localhost:52739 -i spec/fixtures/litmus_inventory.yaml
Bolt might be installed as a gem. To use Bolt reliably and with all of its
dependencies, uninstall the 'bolt' gem and install Bolt as a package:
https://puppet.com/docs/bolt/latest/bolt_installing.html
If you meant to install Bolt as a gem and want to disable this warning,
set the BOLT_GEM environment variable. [ID: gem_install]
Started on ae77bba00216...
Finished on ae77bba00216:
/etc/puppetlabs/code/environments/production/modules
├── puppetlabs-motd (v7.1.0)
├── puppetlabs-registry (v5.0.1)
└── puppetlabs-stdlib (v9.6.0)
/etc/puppetlabs/code/modules (no modules installed)
/opt/puppetlabs/puppet/modules (no modules installed)
Successful on 1 target: ae77bba00216
Ran on 1 target in 0.99 sec
# run acceptance tests
➜ puppetlabs-motd git:(main) ✗ bundle exec rake litmus:acceptance:parallel
┌ [✔] Running against 2 targets.
├── [✔] localhost:52938, litmusimage/debian:12
└── [✔] localhost:52739, litmusimage/ubuntu:22.04
================
localhost:52739, litmusimage/ubuntu:22.04
......
Finished in 16.05 seconds (files took 3.64 seconds to load)
6 examples, 0 failures
pid 78632 exit 0
================
localhost:52938, litmusimage/debian:12
........
Finished in 18.21 seconds (files took 3.61 seconds to load)
8 examples, 0 failures
pid 78631 exit 0
Successful on 2 nodes: ["localhost:52739, litmusimage/ubuntu:22.04", "localhost:52938, litmusimage/debian:12"]
Checking connectivity for ["localhost:52938", "localhost:52739"]
Connectivity check PASSED.
➜ puppetlabs-motd git:(main) ✗
|
LukasAud
approved these changes
Dec 11, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
puppet_litmus needs to be re-pointed to the latest bolt version 4.0.0 as it is currently pinned to the old. This is breaking CI. This PR fixes this.
Although all the CI tests are passing I did a manual verification of a puppet_litmus provision and test, which uses the underlying bolt. See in comments
Checklist