Skip to content

Conversation

lantoli
Copy link
Collaborator

@lantoli lantoli commented Sep 11, 2025

Description

Allow no-free clusters without replication_specs in clu2adv command

Link to any related issue(s): CLOUDP-344410

Type of change:

  • Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
  • New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR. A migration guide must be created or updated if the new feature will go in a major version.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR. A migration guide must be created or updated.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contributing guides
  • I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code
  • If changes include deprecations or removals I have added appropriate changelog entries.
  • 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.

Further comments

@lantoli lantoli requested a review from a team as a code owner September 11, 2025 16:48
@Copilot Copilot AI review requested due to automatic review settings September 11, 2025 16:48
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modifies the clu2adv command to allow conversion of non-free clusters that lack replication_specs, treating them similarly to free tier clusters by automatically generating default replication specs during conversion.

  • Updated cluster identification logic to use provider_name instead of replication_specs presence
  • Added default replication spec generation for clusters without explicit replication specs
  • Removed the error that previously blocked conversion of clusters missing replication_specs

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

File Description
internal/convert/const.go Added new constants for default node count and tenant provider identification
internal/convert/clu2adv.go Modified cluster identification logic and added default replication spec creation
internal/convert/testdata/adv2v2/errors.json Removed error message for missing replication_specs
internal/convert/testdata/clu2adv/*.tf Updated test data files to reflect new conversion behavior

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lantoli lantoli changed the title feat: Allow no-free clusters without replication_specs in clu2adv command feat: Allow no-free clusters without replication_specs in clu2adv command Sep 11, 2025
@github-actions github-actions bot added the enhancement New feature or request label Sep 11, 2025
@lantoli lantoli merged commit 8eef23c into main Sep 12, 2025
7 checks passed
@lantoli lantoli deleted the CLOUDP-344410_tenant branch September 12, 2025 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants