Skip to content

fix: stabilize GDB switchover and performance integration tests - #210

Open
karenc-bq wants to merge 1 commit into
mainfrom
fix/gdb-switchover-and-perf-tests
Open

karenc-bq wants to merge 1 commit into
mainfrom
fix/gdb-switchover-and-perf-tests

Conversation

@karenc-bq

@karenc-bq karenc-bq commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix three defects that prevent the performance and Global Database integration suites from passing.

Description

  1. Performance spec constant. wrapper_props referenced AwsRubyDatabaseDriverWrapper::PropertyDefinition, but the module is AwsAdvancedRubyDriverWrapper
  2. Pre-outage iterations fail the example. The measurement thread recorded any exception raised before the proxy outage registered into @unhandled_exceptions, which fails the example. A 30 second read_timeout against a 30 second outage delay lands the socket timeout and the outage together, so the MySQL leg failed on timeout=30s outage=30000ms while PostgreSQL passed. Such an iteration has no detection time to measure, so it is now discarded; a failure to open the connection still fails the example.
  3. Switchover issued against a settling cluster. switchover_global_cluster sent the request without checking member state, and RDS rejects a switchover while a member is still settling from an earlier transition, with InvalidDBClusterStateFault. A failback issued straight after a switchover never landed, which left the global cluster with the secondary region as primary for every later example. The call now waits for both member clusters to report available.
  4. IAM region for the global cluster endpoint. IamAuthUtils.region_for resolves a global writer endpoint through describe_global_clusters, reading the region from the writer member's ARN, but it constructs Aws::RDS::Client without a region and the test container ran with no AWS_REGION, so the lookup raised Aws::Errors::MissingRegionError instead. base_iam_props worked around that by pinning iam_region to the configured primary region, which short-circuits region_for and signs a token for the wrong region once a switchover has moved the writer, giving PAM authentication failed. The container now receives AWS_REGION, and base_iam_props no longer sets iam_region.

Removed raises IamAuthError when iam_region is missing for global endpoint. It connected a standard global endpoint with no region and asserted the unable to determine connection region failure, which happened only because the container had no default region. The iam_region override is still covered by connects to secondary cluster endpoint with IAM.

Impacted integration tests are running:
Global Database, Aurora PostgreSQL Performance, Aurora MySQL Performance.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@karenc-bq
karenc-bq requested a review from a team as a code owner October 15, 2026 22:36
@karenc-bq
karenc-bq force-pushed the fix/gdb-switchover-and-perf-tests branch from 731155d to 741be9a Compare October 16, 2026 02:09
sophia-bq
sophia-bq previously approved these changes Oct 19, 2026
raise 'No global cluster identifier configured' if global_cluster_id.nil?

target_arn = cluster_arn(target_cluster_id)
# RDS rejects a switchover while either member is still settling from a previous transition,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved, given the failure in the gdb run on this branch is that unrelated and to be investigated separately? https://github.com/aws/aws-advanced-ruby-driver-wrapper/actions/runs/38956612852

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.

3 participants