-
Notifications
You must be signed in to change notification settings - Fork 189
fix: Avoid error when removing read only spec in region config that does not define electable specs #3162
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
Conversation
.changelog/3162.txt
Outdated
@@ -0,0 +1,3 @@ | |||
```release-note:bug | |||
resource/mongodbatlas_advanced_cluster (preview provider 2.0.0): Avoid error when removing `read_only_specs` in `region_configs` that does not define `electable_specs` |
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.
using mongodbatlas_advanced_cluster (preview provider 2.0.0)
in the changelog
@@ -1375,23 +1388,25 @@ func TestAccMockableAdvancedCluster_shardedAddAnalyticsAndAutoScaling(t *testing | |||
}) | |||
} | |||
|
|||
func TestAccMockableAdvancedCluster_removeBlocksFromConfig(t *testing.T) { | |||
func TestAccAdvancedCluster_removeBlocksFromConfig(t *testing.T) { |
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.
refactored removeBlocksFromConfig
from a Mockable to regular test.
Main motivation was that execution of this test is long (+40min) and getting a successful local execution for updating golden files is a challenge. @lantoli I know you recently added this test, let me know if you see a concern with this.
APIx bot: a message has been sent to Docs Slack channel |
}, | ||
}, | ||
} | ||
testStep := acc.TestStepCheckEmptyPlan(config) |
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.
Nice. Refactor, like it better than what I did in #3105
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.
LGTM.
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.
LGTM
…e and disk_size_gb values with state after ignore block is removed
…ze for triggering a change
…tance_size for triggering a change" This reverts commit 9709558.
…ral replication spec
Added additional changes to handle scenario that appeared in one of the tests:
The read only spec that was removed will have the new updated value of the instance size defined in the associated region_config electable spec. ff33457 and 7870b3c specifically capture this fix. Verifying successful tests in |
Description
Link to any related issue(s): CLOUDP-306136, also follow ups on test made in CLOUDP-305352.
A change is made to the plan modifier so that if a region does not have an electable spec, if a read only spec is removed its values are still taken from the state. Complete details and example in CLOUDP-306136.
Additional test changes present in PR:
Type of change:
Required Checklist:
Further comments