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

Make ::contrib a noop on OSes without a contrib package #1309

Conversation

carlosduelo
Copy link
Contributor

Debian family provides postgresql-contriub-XY as a virtual package of postgresql-XY.

Not sure if allowing virtual packages here is the best solution 🤔

Referencies:
https://packages.debian.org/bullseye/postgresql-contrib-13
https://packages.ubuntu.com/bionic/postgresql-contrib

@carlosduelo carlosduelo requested a review from a team as a code owner November 1, 2021 10:16
@CLAassistant
Copy link

CLAassistant commented Nov 1, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@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.

If it's a virtual, I wonder if a solution that also works for Gentoo (which also doesn't have a real package) would be better. Like making contrib_package_name an Optional[String[1]] and if it's undef then don't install it.

I'm not sure that's the best solution either. What are your thoughts on it?

manifests/params.pp Outdated Show resolved Hide resolved
Copy link
Collaborator

@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.

I think that a $contrib_virtual_package is not needed at all. Instead, what I meant was to make $contrib_package_name itself default to undef if there is no (real) contrib package.

manifests/params.pp Outdated Show resolved Hide resolved
manifests/params.pp Outdated Show resolved Hide resolved
manifests/params.pp Outdated Show resolved Hide resolved
manifests/params.pp Outdated Show resolved Hide resolved
manifests/server/contrib.pp Outdated Show resolved Hide resolved
manifests/server/contrib.pp Outdated Show resolved Hide resolved
manifests/server/contrib.pp Outdated Show resolved Hide resolved
@carlosduelo carlosduelo force-pushed the postgresql-contrib-is-virtual-package-some-dists branch 2 times, most recently from 7e7fc58 to 0e5cb49 Compare November 1, 2021 12:02
@ekohl ekohl changed the title debian package postgresql-contriub virtual package debian package postgresql-contrib virtual package Nov 1, 2021
manifests/server/contrib.pp Outdated Show resolved Hide resolved
@carlosduelo carlosduelo force-pushed the postgresql-contrib-is-virtual-package-some-dists branch 2 times, most recently from f57f823 to 6050cfb Compare November 3, 2021 19:51
@carlosduelo carlosduelo requested review from ekohl and removed request for a team November 4, 2021 18:39
- In debian families:
postgresql-contrib is a virtual package and it is not needed to be installed.

- Archlinux does have postgresql-contrib but it isn't maintained

- Gentoo provides contrib in the main package

Referencies:
https://packages.debian.org/bullseye/postgresql-contrib-13
https://packages.ubuntu.com/bionic/postgresql-contrib
@carlosduelo carlosduelo force-pushed the postgresql-contrib-is-virtual-package-some-dists branch from 6050cfb to 70a0f3c Compare November 10, 2021 08:54
Now the contrib package is not installed in Debian
So test must check RedHat for exmaple
Gentoo is not failing so raise check should not be done anymore.
@carlosduelo carlosduelo force-pushed the postgresql-contrib-is-virtual-package-some-dists branch from 70a0f3c to f10a335 Compare November 10, 2021 10:00
Copy link
Collaborator

@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.

This is indeed the implementation I suggested. Minor testing suggestion, but otherwise 👍

spec/unit/classes/server/contrib_spec.rb Outdated Show resolved Hide resolved
Copy link
Collaborator

@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.

Code wise this looks good to me. I started the tests and if they're green this should be merged. Thanks!

@carlosduelo
Copy link
Contributor Author

Code wise this looks good to me. I started the tests and if they're green this should be merged. Thanks!

@ekohl can you help me? I don't know why some of them where canceled :(

@ekohl
Copy link
Collaborator

ekohl commented Nov 18, 2021

Looks like they timed out but I think it's safe to ignore those so I'm going to go ahead and merge this. Thanks @carlosduelo!

@ekohl ekohl merged commit dd190cd into puppetlabs:main Nov 18, 2021
@ekohl ekohl added the feature label Jan 26, 2022
@ekohl ekohl changed the title debian package postgresql-contrib virtual package Make ::contrib a noop on OSes without a contrib package Jan 26, 2022
cegeka-jenkins pushed a commit to cegeka/puppet-postgresql that referenced this pull request Feb 3, 2022
…b-is-virtual-package-some-dists

debian package postgresql-contrib virtual package
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