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

Clean up globals logic to support CentOS 8 stream #1225

Merged
merged 2 commits into from
Feb 1, 2021

Conversation

ekohl
Copy link
Collaborator

@ekohl ekohl commented Jan 10, 2021

This is a code simplification for distributions that don't change the
PostgreSQL version in a major release. As a bonus fact, it adds support for
CentOS 8 Stream which identifies itself without a minor version.

For completeness, the OS facts from CentOS 8 Stream:

# facter os
{
  architecture => "x86_64",
  family => "RedHat",
  hardware => "x86_64",
  name => "CentOS",
  release => {
    full => "8",
    major => "8"
  },
  selinux => {
    enabled => false
  }
}

This is an alternative to #1222.

@ekohl ekohl requested a review from a team as a code owner January 10, 2021 15:37
@puppet-community-rangefinder
Copy link

postgresql::globals is a class

Breaking changes to this file WILL impact these 20 modules (exact match):
Breaking changes to this file MAY impact these 2 modules (near match):

This module is declared in 70 of 576 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@codecov-io
Copy link

codecov-io commented Jan 10, 2021

Codecov Report

Merging #1225 (3eb6299) into main (08e3a51) will increase coverage by 0.37%.
The diff coverage is 37.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1225      +/-   ##
==========================================
+ Coverage   65.81%   66.18%   +0.37%     
==========================================
  Files          14       14              
  Lines         351      349       -2     
==========================================
  Hits          231      231              
+ Misses        120      118       -2     
Impacted Files Coverage Δ
...ns/postgresql/postgresql_acls_to_resources_hash.rb 0.00% <0.00%> (ø)
...b/puppet/functions/postgresql/postgresql_escape.rb 0.00% <0.00%> (ø)
lib/puppet/util/postgresql_validator.rb 90.90% <0.00%> (ø)
lib/puppet/type/postgresql_psql.rb 90.14% <66.66%> (ø)
...uppet/provider/postgresql_replication_slot/ruby.rb 75.86% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d6e875...3eb6299. Read the comment docs.

@sheenaajay
Copy link
Contributor

Thanks @ekohl for your contribution as always.
Could you please take a look at unit tests which are failing with the second commit.

@ekohl ekohl force-pushed the use-major-version branch 2 times, most recently from 16b80c3 to f064ba8 Compare January 11, 2021 11:55
@sheenaajay sheenaajay self-assigned this Jan 11, 2021
@ekohl
Copy link
Collaborator Author

ekohl commented Jan 11, 2021

Looks like I need to do a bit more.

@ekohl
Copy link
Collaborator Author

ekohl commented Jan 11, 2021

I went through all files that used the full version. Also went through tests. It's confusing that this module places the files in spec/unit/defines rather than spec/defines as is the convention.

This is a code simplification for distributions that don't change the
PostgreSQL version in a major release. As a bonus fact, it adds support
for CentOS 8 Stream which identifies itself without a minor version.

For completeness, the OS facts from CentOS 8 Stream:

    # facter os
    {
      architecture => "x86_64",
      family => "RedHat",
      hardware => "x86_64",
      name => "CentOS",
      release => {
        full => "8",
        major => "8"
      },
      selinux => {
        enabled => false
      }
    }
Both branches of the selector have the same version so it's redundant.
@ekohl
Copy link
Collaborator Author

ekohl commented Jan 11, 2021

💚 now

@ekohl ekohl mentioned this pull request Jan 11, 2021
@sheenaajay
Copy link
Contributor

Thank you @ekohl for the fixes.

@ekohl
Copy link
Collaborator Author

ekohl commented Jan 28, 2021

@sheenaajay anything holding back a merge? I hope to see this in a released version soon.

@sheenaajay
Copy link
Contributor

@ekohl Sorry for the delay. Next one on the list :-) . We have a release coming soon for a bug fix and can get this also included. Thank you.

@sheenaajay sheenaajay merged commit 15c8728 into puppetlabs:main Feb 1, 2021
@ekohl ekohl deleted the use-major-version branch February 1, 2021 10:40
cegeka-jenkins pushed a commit to cegeka/puppet-postgresql that referenced this pull request Feb 3, 2022
Clean up globals logic to support CentOS 8 stream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants