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

Track known-bad os and puppet combinations #19

Closed
wants to merge 1 commit into from

Conversation

smortex
Copy link
Member

@smortex smortex commented Jul 29, 2021

This is used to avoid running acceptance tests on systems where versions
of Puppet are not supported (yet or anymore).

This is used to avoid running acceptance tests on systems where versions
of Puppet are not supported (yet or anymore).
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

So the idea is to emit this too and then in the Github action you add an exclude with them? I wonder how this compares not emitting them in the first place. I guess either of them could work.

Slight note: you're missing the Fedora builds.

@@ -63,5 +64,35 @@ def puppet_ruby_version(puppet_version)
'2.7'
end
end

def known_bad_combinations(beaker_setfiles, puppet_major_versions)
supporder_versions = {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
supporder_versions = {
supporded_versions = {

Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
supporder_versions = {
supported_versions = {

🙃

Comment on lines +69 to +82
supporder_versions = {
'CentOS 5' => 5..7,
'CentOS 6' => 5..7,
'CentOS 7' => 5..7,
'CentOS 8' => 5..7,
'Debian 7' => [5],
'Debian 8' => 5..7,
'Debian 9' => 5..7,
'Debian 10' => 5..7,
'Ubuntu 14.04' => 5..6,
'Ubuntu 16.04' => 5..7,
'Ubuntu 18.04' => 5..7,
'Ubuntu 20.04' => 6..7,
}
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps this should be something like AIO_BUILDS

@ekohl
Copy link
Member

ekohl commented Jul 29, 2021

So the idea is to emit this too and then in the Github action you add an exclude with them? I wonder how this compares not emitting them in the first place. I guess either of them could work.

I took a stab at this myself but that would really change the current approach. Instead of feeding it 2 vectors, you'd need to pass it an include block.

I also thought about the logic and I came up with:

module PuppetMetadata
  class AIO 
    BUILDS = { 
      # RPM-based
      'CentOS' => {
        '5' => 5..7,
        '6' => 5..7,
        '7' => 5..7,
        '8' => 5..7,
      },
      'Fedora' => {
        '26' => [5],
        '27' => 5..6,
        '28' => 5..6,
        '29' => 5..6,
        '30' => 5..7,
        '31' => 5..7,
        '32' => 6..7,
        '34' => 6..7,
      },
      # TODO: SLES/Suse
      # deb-based
      'Debian' => {
        '7' => [5],
        '8' => 5..7,
        '9' => 5..7,
        '10' => 5..7,
      },
      'Ubuntu' => {
        '14.04' => 5..6,
        '16.04' => 5..7,
        '18.04' => 5..7,
        '20.04' => 6..7,
      },
    }

    def self.has_aio_build?(os, release, puppet_version)
      # TODO: group CentOS with RedHat/AlmaLinux/Rocky?
      BUILDS.dig(os, release)&.include?(puppet_version)
    end
  end
end

@smortex
Copy link
Member Author

smortex commented Aug 3, 2021

Generating only an include with all supported "known-good" combinations is probably better yes… If you have something, feel free to push it here (or in another PR and close this one). If not, I will try to have a look at it in the next few days.

@smortex
Copy link
Member Author

smortex commented Aug 5, 2021

Closing in favor of #21

@smortex smortex closed this Aug 5, 2021
@smortex smortex deleted the known-bad branch August 5, 2021 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants