Skip to content

MODULES-11049 - Implement default privileges changes #1267

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

Merged
merged 1 commit into from
Jun 14, 2021

Conversation

mtancoigne
Copy link
Contributor

Following the feature request, this PR allow to grant or revoke default privileges on objects in a schema.

I still have to update the documentation.

@puppet-community-rangefinder
Copy link

postgresql::server::default_privileges is a type

that may have no external impact to Forge modules.

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.

@mtancoigne mtancoigne marked this pull request as ready for review April 16, 2021 07:16
@mtancoigne mtancoigne requested a review from a team as a code owner April 16, 2021 07:16
@sheenaajay
Copy link
Contributor

Thanks @mtancoigne for your contribution. The tests are failing on some OS with the following error
Default_privileges is only useable with PostgreSQL >= 9.6

The default version on each OS is given here https://github.com/puppetlabs/puppetlabs-postgresql/blob/main/manifests/globals.pp#L167

We may have to restrict the tests not to run on those OSes which have defaults <9.6

@mtancoigne
Copy link
Contributor Author

Good to know, thank you, i'll update the PR!

@sheenaajay
Copy link
Contributor

Thanks @mtancoigne for updating the tests. The unit tests are failing.
https://github.com/puppetlabs/puppetlabs-postgresql/pull/1267/checks?check_run_id=2543787040#step:10:37
Could you please take a look.
Meanwhile testing the default privileges changes locally. Thank you.

@mtancoigne mtancoigne force-pushed the default-privileges branch from b2e3f7d to ba8c9f4 Compare May 11, 2021 17:48
@mtancoigne
Copy link
Contributor Author

I updated the tests and will squash the commits once it's all green.

@sheenaajay
Copy link
Contributor

Thanks @mtancoigne for the changes. Tested for different object types and its looking good.
Screenshot 2021-05-17 at 11 46 33

As you have mentioned, could you please update the document for this new feature.

Great work.Thank you.

@mtancoigne
Copy link
Contributor Author

You're welcome, I'll try to update documentation as soon as possible this week.

@mtancoigne mtancoigne force-pushed the default-privileges branch from ba8c9f4 to f9bfba7 Compare May 28, 2021 08:56
@mtancoigne
Copy link
Contributor Author

README was updated and commits were squashed.

sheenaajay
sheenaajay previously approved these changes Jun 7, 2021
@@ -0,0 +1,144 @@
define postgresql::server::default_privileges (
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please add the summary and parameter details which will help with autogenerating REFERENCE.md file prior to each release.
For example
https://github.com/puppetlabs/puppetlabs-postgresql/blob/main/manifests/server/database_grant.pp#L1
https://github.com/puppetlabs/puppetlabs-postgresql/blob/main/REFERENCE.md

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Of course, i'll do it this week.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks alot @mtancoigne for incorporating the comments

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's done.

@sheenaajay
Copy link
Contributor

Thank you @mtancoigne for your contribution.

# frozen_string_literal: true

require 'spec_helper'
require 'spec_helper_acceptance'
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is wrong. A unit test should not include the acceptance helper and has broken the test suite further than it already was.

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.

3 participants