-
Notifications
You must be signed in to change notification settings - Fork 92
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
pg_hba module refactoring #772
pg_hba module refactoring #772
Conversation
1a1e0ce
to
6b26705
Compare
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.
LGTM .. do we need a fragment for refactors @Andersson007 ?
@hunleyd thanks for pinging! @toydarian thanks, great improvement! Sorry for the late reply, was on PTO last week. |
i'm ok with either option |
You never know, there could be somebody who parses the output and then it would break for them. It also make it easier to parse the output, though. I can change that and we can save it for the next major release. |
Hi, I currently don't have time for an in-depth review. |
@betanummeric mentioned important points:
@toydarian thoughts? I would discuss another module for fetching rules like pg_hba_info or something but it's another discussion. Let's make sure now that the module works as it did and merge the PR ASAP |
The change is insignificant in this case. The order only changes for networks with the same size and it adheres to how the
I'll add some code to make it work as before. We can talk about the |
@toydarian thanks for explaining! OK, please ping us explicitly when it's ready for another round of review, thanks |
@Andersson007 @hunleyd changed as discussed, added changelog fragment |
@toydarian thanks for the contribution! |
SUMMARY
This is a refactoring-only PR and another step on the refactoring and improvement-journey of that module.
There is a minor change which is, that internally auth-options are now represented with dicts and not with strings anymore. This allows us to verify that the same key doesn't appear multiple times. The integration-tests have been changed to account for that.
There is one more change in the tests, which is due to ordering of rules. I don't know how or why this was the way it was. I'm going with how
ipaddress
sorts those networks, which I think makes sense:Otherwise this doesn't change the modules behavior.
More changes:
In upcoming PRs, I will add
include
ISSUE TYPE
COMPONENT NAME
postgresql_pg_hba