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

postgresql_pg_hba: Exception when two lines with same weight are compared #59198

Merged
merged 1 commit into from
Jul 18, 2019
Merged

postgresql_pg_hba: Exception when two lines with same weight are compared #59198

merged 1 commit into from
Jul 18, 2019

Conversation

sebasmannem
Copy link
Contributor

SUMMARY

akasurde@redhat.com mentioned:
I feel this block code is not right -

errormessage = 'We have two rules ({1}, {2})'.format(self, other)

  1. It seems to be unreachable code
  2. String formatting should start 0 not with 1

He is correct. Furthermore, KeyErrors where not managed correctly, and in some cases, unnecessary Exceptions still occurred.

  • Bugfix Pull Request
COMPONENT NAME

module postgresql_pg_hba

ADDITIONAL INFORMATION

I added another test for this.
Furthermore, order is now managed correctly in the specific cases.

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. community_review In order to be merged, this PR must follow the community review workflow. database Database category module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. postgresql PostgreSQL community support:community This issue/PR relates to code supported by the Ansible community. test This PR relates to tests. labels Jul 17, 2019
@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Jul 18, 2019
@Akasurde Akasurde self-assigned this Jul 18, 2019
@Akasurde Akasurde self-requested a review July 18, 2019 02:09
@Akasurde Akasurde changed the title Exception when two lines with same weight are compared, as reported by postgresql_pg_hba: Exception when two lines with same weight are compared Jul 18, 2019
Copy link
Member

@Akasurde Akasurde left a comment

Choose a reason for hiding this comment

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

LGTM, waiting for @Andersson007 to comment.

@Akasurde
Copy link
Member

@sebasmannem Thanks for testing and fixing this issue.

@kostiantyn-nemchenko
Copy link
Contributor

shipit

@ansibot ansibot added shipit This PR is ready to be merged by Core and removed community_review In order to be merged, this PR must follow the community review workflow. labels Jul 18, 2019
@Akasurde Akasurde merged commit d0538c0 into ansible:devel Jul 18, 2019
@Andersson007
Copy link
Contributor

@Akasurde , thanks for mentioning me :) Ansibot doesn't sleep :)
@sebasmannem , thanks for working on this
@kostiantyn-nemchenko , thanks for reviewing

@Andersson007
Copy link
Contributor

Maybe backport?

@ansible ansible locked and limited conversation to collaborators Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. database Database category module This issue/PR relates to a module. postgresql PostgreSQL community shipit This PR is ready to be merged by Core support:community This issue/PR relates to code supported by the Ansible community. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants