Create a GEOSHARDED cluster with a single replication spec (zone1) with 3 nodes
Update the cluster:
Change from 3->5 nodes in zone1
Add a new replication spec (zone2) with 5 nodes
Assert the replication_id is kept on the 1st replication spec, and a new replication spec is added and both replication specs have 5 nodes
Fix Summary
The fix reads the current cluster if replication specs are set and "matches" replication IDs.
See the unit tests in mappings_test for the matching details.
Note: We couldn't reuse the Terraform implementation since CFN doesn't store the full state of the resource.
It only receives the template used for the update call; this means the replication_spec IDs will never be set on the prevModel or currentModel (this behavior was "discovered" by trying an initial fix of updating the replication specs of the currentModel during create)
Link to any related issue(s): CLOUDP-256730 and CLOUDP-256534
Type of change:
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as
expected)
[ ] This change requires a documentation update
[ ] If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.
Proposed changes
Test Summary
Fix Summary
The fix reads the current cluster if replication specs are set and "matches" replication IDs. See the unit tests in
mappings_test
for the matching details.Note: We couldn't reuse the Terraform implementation since CFN doesn't store the full state of the resource. It only receives the template used for the update call; this means the replication_spec IDs will never be set on the
prevModel
orcurrentModel
(this behavior was "discovered" by trying an initial fix of updating the replication specs of thecurrentModel
during create)Bug reproduced & fix screenshots
Example of failing e2e test (Github action before fix committed)
Screenshot from CFN:
Example of passing e2e test (Github action after fix committed)
Screenshot from CFN:
Link to any related issue(s): CLOUDP-256730 and CLOUDP-256534
Type of change:
Manual QA performed:
Required Checklist:
make fmt
and formatted my codeFurther comments
contract tests: