Skip to content

APPSRE9806: Adding replica removal validation #111

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

suzana-nesic
Copy link

@suzana-nesic suzana-nesic commented Mar 18, 2025

We advise our tenants to remove read replicas before a RDS upgrade but do not have any error validations in case that step is missed. This PR is to add logic to enforce that message.

Solves the reconcile error: DBUpgradeDependencyFailure: One or more of the DB Instance's read replicas need to be upgraded

PR for non-managed erv2 instances: app-sre/qontract-reconcile#4873

@suzana-nesic suzana-nesic changed the title adding replica removal validation APPSRE9806: Adding replica removal validation Mar 18, 2025
@@ -128,6 +129,11 @@ def _validate_version_upgrade(self) -> None:
self.errors.append(
"To enable major version ugprades, allow_major_version_upgrade attribute must be set to True"
)
# Read replica removal validation
if len(u.change.after["replicas"]) > 0:
Copy link
Contributor

Choose a reason for hiding this comment

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

what change can happen in replicas? Do you have an example and add it to current tests?

Copy link
Contributor

@hemslo hemslo Mar 19, 2025

Choose a reason for hiding this comment

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

and we manage replica and source instances in 2 different terraform state, run in different jobs, so this limitation shouldn't be apply here.

Instead we can check if replicas already upgraded to new version, then allow source instance to upgrade.

@suzana-nesic suzana-nesic force-pushed the appsre9806-replica-error-validation branch from 8127e29 to 4ee7cb8 Compare April 7, 2025 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants