Skip to content

Conversation

@dragomirp
Copy link
Contributor

@dragomirp dragomirp commented Sep 20, 2025

Port of canonical/postgresql-operator#1166 and canonical/postgresql-operator#1168

  • Remove reinitialisatons
  • Hash config when checking restarts
  • Update charm libs

Checklist

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

@dragomirp dragomirp added the enhancement New feature or request label Sep 20, 2025
@github-actions github-actions bot added the Libraries: Out of sync The charm libs used are out-of-sync label Sep 20, 2025
@codecov
Copy link

codecov bot commented Sep 20, 2025

Codecov Report

❌ Patch coverage is 72.91667% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.28%. Comparing base (33b9b98) to head (3f164bc).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/charm.py 71.05% 9 Missing and 2 partials ⚠️
src/relations/db.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1101      +/-   ##
==========================================
+ Coverage   73.22%   73.28%   +0.05%     
==========================================
  Files          15       15              
  Lines        3929     3904      -25     
  Branches      577      573       -4     
==========================================
- Hits         2877     2861      -16     
+ Misses        836      829       -7     
+ Partials      216      214       -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.

@github-actions github-actions bot added Libraries: OK The charm libs used are OK and in-sync and removed Libraries: Out of sync The charm libs used are out-of-sync labels Sep 21, 2025
@github-actions github-actions bot added Libraries: Out of sync The charm libs used are out-of-sync and removed Libraries: OK The charm libs used are OK and in-sync labels Sep 30, 2025
@dragomirp dragomirp changed the title [MISC] Remove reinitialisation and hash config [DPE-8439] Remove reinitialisation and hash config Sep 30, 2025
@github-actions github-actions bot added Libraries: OK The charm libs used are OK and in-sync and removed Libraries: Out of sync The charm libs used are out-of-sync labels Sep 30, 2025
@dragomirp dragomirp marked this pull request as ready for review September 30, 2025 15:31
@dragomirp dragomirp requested review from a team, marceloneppel and taurus-forever and removed request for a team September 30, 2025 15:32
Comment on lines -1634 to -1641
if not self._patroni.member_started and self._patroni.is_database_running:
try:
container.restart(self.postgresql_service)
logger.info("restarted Patroni because it was not running")
except ChangeError:
logger.error("failed to restart Patroni after checking that it was not running")
return False
return True
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@marceloneppel marceloneppel left a comment

Choose a reason for hiding this comment

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

Thank you!

@dragomirp dragomirp merged commit 55155cd into main Oct 2, 2025
1385 of 1408 checks passed
@dragomirp dragomirp deleted the no-reinit-config-hash branch October 2, 2025 10:39
@shipperizer shipperizer mentioned this pull request Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Libraries: OK The charm libs used are OK and in-sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants