-
Notifications
You must be signed in to change notification settings - Fork 13
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
Track known-good os and puppet combinations #21
Conversation
This is used to avoid running acceptance tests on systems where versions of Puppet are not supported (yet or anymore).
An example of usage of this code in a configuration where the combination Ubuntu 20.04 and Puppet 5 is not valid and is excluded is available here: |
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.
I'm happy with this, but let's keep it open in case @ekohl want's to review it as well
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.
Overall I think this can be a good path forward.
lib/puppet_metadata/aio.rb
Outdated
class AIO | ||
BUILDS = { | ||
# RPM-based | ||
'CentOS' => { |
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.
I know I suggested this code earlier, but perhaps this is closer to the truth?
'CentOS' => { | |
'RedHat' => { |
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.
I am not a user of RPM based platforms so can't tell which way is better, but as CentOS is a RedHat derivative it makes sense for me to be closer to the "root" for this hash.
lib/puppet_metadata/aio.rb
Outdated
} | ||
|
||
def self.has_aio_build?(os, release, puppet_version) | ||
# TODO: group CentOS with RedHat/AlmaLinux/Rocky? |
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.
Perhaps something like:
COMPATIBLE = {
'CentOS' => 'RedHat',
'AlmaLinux' => 'RedHat',
# TODO: add all others? Rocky, Amazon, OracleLinux?
}
def self.find_base_os(os)
COMPATIBLE.fetch(os, os)
end
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.
Did that. I also tried to replace the TODO with actual code 😁
puppet_major_versions.each do |puppet_version| | ||
metadata.operatingsystems.each do |os, releases| |
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.
Just a small note: I wonder if we should iterate the other way around. That way the Github actions will be sorted by OS instead of Puppet version.
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.
Yes, I was also confused by this… The versions of Puppet also seems to go backwards… I'll check!
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.
I think my reasoning for that was that you first see the results of the newest Puppet versions. I don't know if anyone else cares about the order, but that's the thought behind it.
When an operating system is based on another, it helps to be able to group them all under a "family" and list compatible Puppet versions for that whole family.
Group tasks per OS rather than per Puppet version. The build matrix used to be construcuted this way when GitHub was building them.
We are not expecting to have a nil result from ::os_release_to_setfile, but better safe than sorry.
I added empty commits to voxpupuli/puppet-splunk#315 to show the result of the changes regarding ordering. Unfortunately dependencies have broken CI, but if we ignore the pass/fail and only consider the tests which are runs, this seems more readable. |
This is used to avoid running acceptance tests on systems where versions
of Puppet are not supported (yet or anymore).