Skip to content

Comments

[DPE-9448] Don't override upgrade status#1284

Open
dragomirp wants to merge 3 commits intomainfrom
dpe-9448-update-status
Open

[DPE-9448] Don't override upgrade status#1284
dragomirp wants to merge 3 commits intomainfrom
dpe-9448-update-status

Conversation

@dragomirp
Copy link
Contributor

@dragomirp dragomirp commented Feb 18, 2026

Issue

Unit status during upgrade gets overwritten, hiding from the user that upgrade did not complete

Solution

Add a check for upgrade idleness in the helper method

Checklist

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

@dragomirp dragomirp added the bug Something isn't working as expected label Feb 18, 2026
@github-actions github-actions bot added the Libraries: OK The charm libs used are OK and in-sync label Feb 18, 2026
@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.73%. Comparing base (4aaa6bf) to head (e1747c6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1284      +/-   ##
==========================================
- Coverage   72.76%   72.73%   -0.03%     
==========================================
  Files          16       16              
  Lines        4130     4126       -4     
  Branches      606      607       +1     
==========================================
- Hits         3005     3001       -4     
  Misses        897      897              
  Partials      228      228              

☔ 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: 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 Feb 20, 2026
@dragomirp dragomirp marked this pull request as ready for review February 20, 2026 14:05
PostgreSQLGetPostgreSQLVersionError,
)
from ops.charm import (
from ops import (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Import from ops directly, not strictly necessary.

Comment on lines +1054 to +1055
if not self.upgrade.idle:
return
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If upgrade is not idle, don't overwrite the status.

@dragomirp dragomirp requested review from a team, carlcsaposs-canonical, juju-charm-bot, marceloneppel and taurus-forever and removed request for a team February 20, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected Libraries: Out of sync The charm libs used are out-of-sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants