Draft
Conversation
97b91c6 to
2d74302
Compare
dcb8b91 to
2a41551
Compare
- cluster_id - create_date Changed from Optional+Computed to Optional-only: - backup_enabled - config_server_management_mode - encryption_at_rest_provider - global_cluster_self_managed_sharding - mongo_db_major_version - paused - pit_enabled - redact_client_log_data - replica_set_scaling_strategy - termination_protection_enabled - version_release_system
2a41551 to
1f15aed
Compare
011853b to
f830181
Compare
4e66e98 to
535fa02
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements a proof-of-concept for "effective_replication_specs" as part of the v3.0.0 major version upgrade. It represents a significant architectural change to how the mongodbatlas_advanced_cluster resource handles auto-scaling and state management.
Changes:
- Removes
use_effective_fieldsattribute and implements its behavior as the default - Changes resource
replication_specschildren to Optional-only (not Computed) - Adds
effective_replication_specsto data sources showing actual running configuration - Implements comprehensive null preservation logic for Optional-only attributes
- Updates state upgraders to migrate from v1/v2 to v3 schema
Reviewed changes
Copilot reviewed 46 out of 46 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/service/advancedcluster/schema.go | Schema version bump to 3, removes use_effective_fields, changes attributes to Optional-only |
| internal/service/advancedcluster/resource_compatiblity.go | Implements extensive null preservation logic for Optional-only attributes |
| internal/service/advancedcluster/resource.go | Removes use_effective_fields handling, adds recalculation logic for patches |
| internal/service/advancedcluster/common_admin_sdk.go | Adds patch recalculation to avoid unnecessary API calls, uses new API header |
| internal/service/advancedcluster/model_*.go | Updates model conversions for new schema structure, adds sorting for deterministic ordering |
| internal/service/advancedcluster/move_upgrade_state.go | Simplifies state upgrader by removing v2-specific logic |
| internal/service/advancedcluster/plan_modifier*.go | Replaces complex plan modifier with simple validation for removed specs |
| internal/service/advancedcluster/*_test.go | Updates tests with TODO markers for import and mock data issues |
| docs/* | Comprehensive documentation updates and new upgrade guide |
| examples/* | Updates examples to remove use_effective_fields, adds effective_replication_specs examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
# Conflicts: # docs/resources/advanced_cluster.md
…ffective_rep_specs
# Conflicts: # internal/service/advancedcluster/model_ClusterDescription20240805.go # internal/service/advancedcluster/schema.go
…ffective_rep_specs
…ffective_rep_specs # Conflicts: # internal/common/conversion/type_conversion.go # internal/service/advancedcluster/model_to_ClusterDescription20240805.go # internal/service/advancedcluster/plural_data_source.go
…ffective_rep_specs
…ffective_rep_specs
…ffective_rep_specs
…ffective_rep_specs
…ffective_rep_specs
…ffective_rep_specs
…ffective_rep_specs
…ffective_rep_specs
…ffective_rep_specs
…ffective_rep_specs
…ffective_rep_specs
…ffective_rep_specs
…ffective_rep_specs # Conflicts: # internal/provider/provider_sdk2.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
PoC effective_replication_specs
Link to any related issue(s): CLOUDP-376263
Type of change:
Required Checklist:
Further comments