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

Update gem versions in modules #152

Merged
merged 8 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 4 additions & 24 deletions config_defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,13 @@ Gemfile:
options:
groups:
- 'test'
- gem: puppet-lint-empty_string-check
options:
groups:
- 'test'
- gem: puppet-lint-file_ensure-check
options:
groups:
- 'test'
- gem: puppet-lint-param-docs
version: '>= 1.3.0'
options:
groups:
- 'test'
- gem: puppet-lint-spaceship_operator_without_tag-check
options:
groups:
- 'test'
- gem: puppet-lint-strict_indent-check
options:
groups:
- 'test'
- gem: puppet-lint-undef_in_function-check
version: '~> 1.0'
options:
groups:
- 'test'
- gem: voxpupuli-test
version: '~> 5.0'
version: '~> 7.0'
options:
groups:
- 'test'
Expand All @@ -41,14 +21,14 @@ Gemfile:
groups:
- 'development'
- gem: 'puppet_metadata'
version: '~> 1.3'
version: '~> 3.4'
- gem: puppet-blacksmith
version: '>= 6.0.0'
options:
groups:
- 'development'
- gem: 'voxpupuli-acceptance'
version: '~> 1.0'
version: '~> 2.0'
options:
groups:
- 'system_tests'
Expand Down
9 changes: 5 additions & 4 deletions moduleroot/.github/workflows/ci.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: CI

on:
pull_request:
schedule:
- cron: '4 4 * * *'
Comment on lines -6 to -7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is so that "no changes to main branch for 60 days" doesn't disable the workflow?
Should we have a second workflow that is doing just schedule?
(non-blocking)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also debated that. In practice I rarely look at it and @ehelms wasn't even aware that we had it. So for now I'm leaning to keeping it disabled.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

k, wfm

(I did use it the other day when for some reason the centos:stream8 container stopped booting out of a sudden to double check that it really worked a few hours ago, but then again this was probably the only use of it by me :D)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also used the other day to see that puppet-katello was already failing before I got started, but I wonder if it still makes sense. At least with the reusable workflows we'll have less duplication if we have 2 separate files.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technically, you could even re-use a re-usable workflow: ci.yml.erb becomes workflow.yml.erb with on: workflow_call and then we have ci.yml and cron.yml that both call that…

or you use ERB to generate two "identical" files with different on statements.

or I shut up and we get it in as is and think later how to overengineer this ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may be able to trick modulesync with using a symlink and read __FILE__ in the on condition. Does that qualify as overengineering? ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a "smart" solution. "smart" solutions tend to explode in spectacular ways down the road. ;-)



concurrency:
Expand All @@ -15,11 +13,14 @@ jobs:
puppet:
name: Puppet
<%- if Dir[File.join(@metadata[:workdir], 'spec', 'acceptance', '**', '*_spec.rb')].any? -%>
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v1
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v2
with:
pidfile_workaround: '<%= @configs['pidfile_workaround'] %>'
<%- if @configs['beaker_facter'] -%>
beaker_facter: '<%= @configs['beaker_facter'] %>'
<%- end -%>
<%- else -%>
uses: voxpupuli/gha-puppet/.github/workflows/basic.yml@v1
uses: voxpupuli/gha-puppet/.github/workflows/basic.yml@v2
with:
<%- end -%>
rubocop: false
Expand Down
3 changes: 2 additions & 1 deletion moduleroot/.gitignore.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ vendor/
.ruby-*

## rspec
spec/fixtures/
spec/fixtures/manifests
spec/fixtures/modules
junit/

## Puppet module
Expand Down
5 changes: 1 addition & 4 deletions moduleroot/Gemfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@

source 'https://rubygems.org'

gem 'puppet', ENV['PUPPET_GEM_VERSION'] || '>= 5.5', groups: ['development', 'test']
gem 'puppet', ENV.fetch('PUPPET_GEM_VERSION', '>= 7'), groups: ['development', 'test']
gem 'rake'

<% (@configs['required'] + (@configs['extra'] || [])).each do |gem| -%>
gem '<%= gem['gem'] %>'<%= ", '#{gem['version']}'" if gem['version'] %><%= ", #{gem['options'].inspect}" if gem['options'] %><%= " if RUBY_VERSION #{gem['ruby_version']}" if (gem['ruby_version']) %>
<% end -%>

# Pin rdoc to prevent updating bundled psych (https://github.com/ruby/rdoc/commit/ebe185c8775b2afe844eb3da6fa78adaa79e29a4)
gem 'rdoc', '< 6.4'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we keep this on Ruby 2 in to prevent updating psych on Ruby 2.7?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a good idea.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to merge it without it and then see


# vim:ft=ruby
Loading