-
Notifications
You must be signed in to change notification settings - Fork 947
[Migration-Check]sdk/resourcemanager/redisenterprise/armredisenterprise #25656
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
base: main
Are you sure you want to change the base?
Conversation
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
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.
Pull request overview
This PR migrates the Redis Enterprise ARM client from v3 to v4.0.0-beta.1, transitioning from AutoRest code generation to the Go Code Generator. The changes include updating the API version from 2025-07-01 to 2025-08-01-preview and introducing new migration functionality.
Key Changes
- Version bump from v3.0.0 to v4.0.0-beta.1
- API version update from 2025-07-01 to 2025-08-01-preview
- New MigrationClient with support for Azure Cache for Redis migration operations
- Response and options type naming simplified (removed client-specific prefixes)
- Added maintenance window configuration support
Reviewed changes
Copilot reviewed 45 out of 46 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| version.go | Updates module version to v4.0.0-beta.1 |
| go.mod | Updates module path to v4 and azcore dependency |
| models.go | Adds migration types, maintenance configuration; contains critical bugs with duplicated PrivateEndpointConnection fields |
| models_serde.go | Updates serialization code; contains critical bugs with duplicated marshal/unmarshal logic |
| responses.go | Simplifies response type names (removes client prefixes) |
| options.go | Simplifies options type names (removes client prefixes) |
| migration_client.go | New client for migration operations |
| *_client.go | Updates API version, comment formatting, and type references |
| fake/* | Updates fake server implementations for testing |
| constants.go | Adds migration-related constants and documentation comments |
Comments suppressed due to low confidence (1)
sdk/resourcemanager/redisenterprise/armredisenterprise/models_serde.go:1810
- The
PrivateEndpointConnectionUnmarshalJSON method has duplicated case statements in the switch. Each field (id, name, properties, systemData, type) appears twice, which will cause the second case to never be reached. Remove the duplicate case statements.
case "id":
err = unpopulate(val, "ID", &p.ID)
delete(rawMsg, key)
case "id":
err = unpopulate(val, "ID", &p.ID)
delete(rawMsg, key)
case "name":
err = unpopulate(val, "Name", &p.Name)
delete(rawMsg, key)
case "name":
err = unpopulate(val, "Name", &p.Name)
delete(rawMsg, key)
case "properties":
err = unpopulate(val, "Properties", &p.Properties)
delete(rawMsg, key)
case "properties":
err = unpopulate(val, "Properties", &p.Properties)
delete(rawMsg, key)
case "systemData":
err = unpopulate(val, "SystemData", &p.SystemData)
delete(rawMsg, key)
case "systemData":
err = unpopulate(val, "SystemData", &p.SystemData)
delete(rawMsg, key)
case "type":
err = unpopulate(val, "Type", &p.Type)
delete(rawMsg, key)
case "type":
err = unpopulate(val, "Type", &p.Type)
delete(rawMsg, key)
}
if err != nil {
return fmt.Errorf("unmarshalling type %T: %v", p, err)
}
}
return nil
}
| // The private endpoint connection properties | ||
| Properties *PrivateEndpointConnectionProperties | ||
|
|
||
| // READ-ONLY; READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} | ||
| ID *string | ||
|
|
||
| // READ-ONLY; READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} | ||
| ID *string | ||
|
|
||
| // READ-ONLY; READ-ONLY; The name of the resource | ||
| Name *string | ||
|
|
||
| // READ-ONLY; READ-ONLY; The name of the resource | ||
| Name *string | ||
|
|
||
| // READ-ONLY; READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. | ||
| SystemData *SystemData | ||
|
|
||
| // READ-ONLY; READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. | ||
| SystemData *SystemData | ||
|
|
||
| // READ-ONLY; READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" | ||
| Type *string | ||
|
|
||
| // READ-ONLY; READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" | ||
| Type *string |
Copilot
AI
Nov 24, 2025
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.
The PrivateEndpointConnection struct has duplicated fields. Each field (ID, Name, Properties, SystemData, Type) appears twice in the struct definition. This will cause compilation errors. Remove the duplicate field declarations.
| // The private endpoint connection properties | |
| Properties *PrivateEndpointConnectionProperties | |
| // READ-ONLY; READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} | |
| ID *string | |
| // READ-ONLY; READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} | |
| ID *string | |
| // READ-ONLY; READ-ONLY; The name of the resource | |
| Name *string | |
| // READ-ONLY; READ-ONLY; The name of the resource | |
| Name *string | |
| // READ-ONLY; READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. | |
| SystemData *SystemData | |
| // READ-ONLY; READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. | |
| SystemData *SystemData | |
| // READ-ONLY; READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" | |
| Type *string | |
| // READ-ONLY; READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" | |
| Type *string | |
| // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} | |
| ID *string | |
| // READ-ONLY; The name of the resource | |
| Name *string | |
| // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. | |
| SystemData *SystemData | |
| // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" | |
| Type *string |
| populate(objectMap, "id", p.ID) | ||
| populate(objectMap, "name", p.Name) | ||
| populate(objectMap, "name", p.Name) | ||
| populate(objectMap, "properties", p.Properties) | ||
| populate(objectMap, "properties", p.Properties) | ||
| populate(objectMap, "systemData", p.SystemData) | ||
| populate(objectMap, "systemData", p.SystemData) | ||
| populate(objectMap, "type", p.Type) | ||
| populate(objectMap, "type", p.Type) |
Copilot
AI
Nov 24, 2025
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.
The PrivateEndpointConnection MarshalJSON method has duplicated populate calls for each field. Each field is populated twice, which is unnecessary and incorrect. Remove the duplicate populate calls for id, name, properties, systemData, and type.
| populate(objectMap, "id", p.ID) | |
| populate(objectMap, "name", p.Name) | |
| populate(objectMap, "name", p.Name) | |
| populate(objectMap, "properties", p.Properties) | |
| populate(objectMap, "properties", p.Properties) | |
| populate(objectMap, "systemData", p.SystemData) | |
| populate(objectMap, "systemData", p.SystemData) | |
| populate(objectMap, "type", p.Type) | |
| populate(objectMap, "type", p.Type) | |
| populate(objectMap, "name", p.Name) | |
| populate(objectMap, "properties", p.Properties) | |
| populate(objectMap, "systemData", p.SystemData) | |
| populate(objectMap, "type", p.Type) |
checking migration breaking change