-
Notifications
You must be signed in to change notification settings - Fork 20
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
[DPE-2289] [DPE-2388] Upgrade from 14/stable and add integration tests #210
Conversation
…unit initialisation
This reverts commit c249b44.
…into dpe-2289-upgrade-integration-tests
assert primary_name == f"{DATABASE_APP_NAME}/0" | ||
|
||
local_charm = await ops_test.build_charm(".") | ||
fault_charm = Path("/tmp/", local_charm.name) |
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.
Fails in CI, we should most probably return a path here: https://github.com/canonical/postgresql-k8s-operator/blob/dpe-2289-upgrade-integration-tests/tests/integration/conftest.py#L74
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.
Good catch. I'm gonna revisit this later.
@marceloneppel are we ready to merge this? I want to promote it to the |
Merging now. |
canonical#210) * Added initial upgrade implementation * Minor fixes * Adjusted code to correctly update the upgrade stack and speed up the unit initialisation * Minor fixes * Updated the code with the new library * Fixed upgrade logic to switchover to unit zero and added unit tests * Added backup creation check * Rollback dependencies * Fixed dependencies * Minor fixes * Final fixes * Removed upgrade integration tests * Pin charmcraft revision * Remove charmcraft pin * Removed hashes from requirements * Revert "Removed upgrade integration tests" This reverts commit c249b44. * Renamed overriden method * Upgraded test * Added replication health check and rock dependency * Comment test * Add additional upgrade logic for stable revision * Fix partially the upgrade from stable * Fix exporter startup * Fix metrics service start * Revert tests * Format * Lint * Add test for upgrade from stable * Add upgrade test * Minor fixes * Fix unit tests * Fix unit tests patches * PR feedback
Issue
We cannot upgrade from
14/stable
.There are no integration tests for the upgrade process.
Solution
Add logic to correctly upgrade from
14/stable
.The monitoring user and its credentials are being created when upgrading from
14/stable
(which doesn't have that user).This also fixes the upgrade from a single unit cluster and updates the workload version.
Add tests that check if the upgrade succeeds, by using some assertions related to the upgrade lib and ensure that no writes from an application are lost during the upgrade process.