fix: Skip connection update for alias migration - #4739
Draft
jwongmongodb wants to merge 1 commit into
Draft
jwongmongodb wants to merge 1 commit into
jwongmongodb wants to merge 1 commit into
Conversation
jwongmongodb
force-pushed
the
fix/stream-connection-alias-state
branch
from
September 16, 2026 19:13
f8575a8 to
062a288
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Computed Azure regions can bypass the optimization, and the incorrectly named changelog file currently fails CI.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Skips unnecessary Atlas PATCH requests during stream connection alias migration.
Changes:
- Detects alias-only state transitions.
- Updates Terraform state without calling Atlas.
- Adds unit coverage and a changelog entry.
File summaries
| File | Description |
|---|---|
resource_stream_connection.go |
Bypasses PATCH for alias-only transitions. |
model_stream_connection.go |
Adds transition detection logic. |
model_alias_transition_test.go |
Tests transition classification. |
.changelog/446873.txt |
Documents the bug fix. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @@ -0,0 +1,3 @@ | |||
| ```release-note:bug | |||
Comment on lines
+33
to
+36
| // ID is computed and may be unknown in an update plan even though no | ||
| // connection setting changed. | ||
| planWithoutAliases.ID = state.ID | ||
| return reflect.DeepEqual(planWithoutAliases, *state) |
jwongmongodb
force-pushed
the
fix/stream-connection-alias-state
branch
from
September 16, 2026 20:48
062a288 to
b5b459a
Compare
Treats an instance_name to workspace_name transition with the same effective workspace and unchanged connection settings as a state-only update. This avoids an Atlas PATCH that active processors prohibit.
jwongmongodb
force-pushed
the
fix/stream-connection-alias-state
branch
from
September 16, 2026 20:51
b5b459a to
fb8f692
Compare
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.
Ticket
CLOUDP-446873
Summary
instance_nametoworkspace_name.regionin the update plan as unchanged when determining whether the transition is alias-only.Testing
go test ./internal/service/streamconnection ./internal/service/streamprocessor