Skip to content

Conversation

dragomirp
Copy link
Contributor

@dragomirp dragomirp commented Jun 16, 2025

Port of canonical/postgresql-operator#959 from VM

  • Hold the database requested hook instead of relying on relation changed events
  • Update linting to noble python version (3.12)
  • Remove stale code (multiple endpoints connected blocking)

Checklist

  • I have added or updated any relevant documentation.
  • I have cleaned any remaining cloud resources from my accounts.

@dragomirp dragomirp added the not bug or enhancement PR is not 'bug' or 'enhancement'. For release notes label Jun 16, 2025
Copy link

codecov bot commented Jun 16, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 72.33%. Comparing base (ebfbe72) to head (1d45776).
Report is 2 commits behind head on 16/edge.

Files with missing lines Patch % Lines
src/relations/postgresql_provider.py 66.66% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           16/edge    #1002      +/-   ##
===========================================
+ Coverage    72.16%   72.33%   +0.17%     
===========================================
  Files           14       14              
  Lines         3693     3680      -13     
  Branches       525      524       -1     
===========================================
- Hits          2665     2662       -3     
+ Misses         829      821       -8     
+ Partials       199      197       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dragomirp dragomirp changed the title [MISC] Hba tweaks 16 [MISC] Hold database created hook for pg_hba changes Jun 16, 2025
# Increment this PATCH version before using `charmcraft publish-lib` or reset
# to 0 if you are raising the major API version
LIBPATCH = 55
LIBPATCH = 52
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Setting to stale version, so we don't release this on the v0 track.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bump linting and dependency python to noble (3.12).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Linting changes.

Comment on lines -309 to -316
def _update_unit_status_on_blocking_endpoint_simultaneously(self):
"""Clean up Blocked status if this is due related of multiple endpoints."""
if (
self.charm._has_blocked_status
and self.charm.unit.status.message == ENDPOINT_SIMULTANEOUSLY_BLOCKING_MESSAGE
and not self._check_multiple_endpoints()
):
self.charm.unit.status = ActiveStatus()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We no longer have multiple endpoints.

@dragomirp dragomirp marked this pull request as ready for review June 17, 2025 09:58
@dragomirp dragomirp requested review from a team, taurus-forever and marceloneppel and removed request for a team June 17, 2025 10:00
@dragomirp dragomirp merged commit f26efa7 into 16/edge Jun 17, 2025
719 of 739 checks passed
@dragomirp dragomirp deleted the hba-tweaks-16 branch June 17, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Libraries: Out of sync not bug or enhancement PR is not 'bug' or 'enhancement'. For release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants