-
Notifications
You must be signed in to change notification settings - Fork 953
[Release] sdk/resourcemanager/dataprotection/armdataprotection/4.0.0 #25275
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
[Release] sdk/resourcemanager/dataprotection/armdataprotection/4.0.0 #25275
Conversation
…generation from spec commit: ba6bab2e42a47a66de7df007a6811b19064f7344
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 pull request releases version 4.0.0 of the Azure Data Protection SDK for Go. The update upgrades the SDK from API version 2024-04-01 to 2025-07-01, introducing new types, operations, and improvements while maintaining backward compatibility in most areas.
Key changes include:
- Update to API version 2025-07-01 with new client generation tooling
- Addition of new ADLS blob backup datasource parameters and validation operations
- Enhanced operation responses with better structured response types
- Improved error handling and documentation updates
Reviewed Changes
Copilot reviewed 87 out of 89 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| version.go | Updates module version to v4.0.0 |
| models.go | Adds new types like AdlsBlobBackupDatasourceParameters and ValidateForModifyBackupRequest |
| responses.go | Introduces new response types and removes inline JSON unmarshaling |
| *_client.go | Updates API version references and improves parameter handling |
| *_example_test.go | Updates examples with new response structures and subscription IDs |
| if len(data) == 0 { | ||
| return nil | ||
| } |
Copilot
AI
Sep 18, 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.
Magic number 0 should be replaced with a named constant for better code maintainability. Consider defining const emptyDataLength = 0 or use a more descriptive check like if data == nil || len(data) == 0.
| } | ||
| ctx := context.Background() | ||
| clientFactory, err := armdataprotection.NewClientFactory("<subscription-id>", cred, nil) | ||
| clientFactory, err := armdataprotection.NewClientFactory("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) |
Copilot
AI
Sep 18, 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.
Hard-coded subscription ID in example code should be replaced with a placeholder like <subscription-id> to avoid potential security issues if this example is copied to production code.
| clientFactory, err := armdataprotection.NewClientFactory("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) | |
| clientFactory, err := armdataprotection.NewClientFactory("<subscription-id>", cred, nil) |
| } | ||
| ctx := context.Background() | ||
| clientFactory, err := armdataprotection.NewClientFactory("<subscription-id>", cred, nil) | ||
| clientFactory, err := armdataprotection.NewClientFactory("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) |
Copilot
AI
Sep 18, 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.
Hard-coded subscription ID in example code should be replaced with a placeholder like <subscription-id> to avoid potential security issues if this example is copied to production code.
| log.Fatalf("failed to obtain a credential: %v", err) | ||
| } | ||
| ctx := context.Background() | ||
| clientFactory, err := armdataprotection.NewClientFactory("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) |
Copilot
AI
Sep 18, 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.
Hard-coded subscription ID in example code should be replaced with a placeholder like <subscription-id> to avoid potential security issues if this example is copied to production code.
| clientFactory, err := armdataprotection.NewClientFactory("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) | |
| clientFactory, err := armdataprotection.NewClientFactory("<subscription-id>", cred, nil) |
| } | ||
| ctx := context.Background() | ||
| clientFactory, err := armdataprotection.NewClientFactory("<subscription-id>", cred, nil) | ||
| clientFactory, err := armdataprotection.NewClientFactory("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) |
Copilot
AI
Sep 18, 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.
Hard-coded subscription ID in example code should be replaced with a placeholder like <subscription-id> to avoid potential security issues if this example is copied to production code.
| clientFactory, err := armdataprotection.NewClientFactory("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) | |
| clientFactory, err := armdataprotection.NewClientFactory("<subscription-id>", cred, nil) |
| } | ||
| ctx := context.Background() | ||
| clientFactory, err := armdataprotection.NewClientFactory("<subscription-id>", cred, nil) | ||
| clientFactory, err := armdataprotection.NewClientFactory("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) |
Copilot
AI
Sep 18, 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.
Hard-coded subscription ID in example code should be replaced with a placeholder like <subscription-id> to avoid potential security issues if this example is copied to production code.
| clientFactory, err := armdataprotection.NewClientFactory("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) | |
| clientFactory, err := armdataprotection.NewClientFactory("<subscription-id>", cred, nil) |
| } | ||
| ctx := context.Background() | ||
| clientFactory, err := armdataprotection.NewClientFactory("<subscription-id>", cred, nil) | ||
| clientFactory, err := armdataprotection.NewClientFactory("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) |
Copilot
AI
Sep 18, 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.
Hard-coded subscription ID in example code should be replaced with a placeholder like <subscription-id> to avoid potential security issues if this example is copied to production code.
| } | ||
| ctx := context.Background() | ||
| clientFactory, err := armdataprotection.NewClientFactory("<subscription-id>", cred, nil) | ||
| clientFactory, err := armdataprotection.NewClientFactory("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) |
Copilot
AI
Sep 18, 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.
Hard-coded subscription ID in example code should be replaced with a placeholder like <subscription-id> to avoid potential security issues if this example is copied to production code.
| clientFactory, err := armdataprotection.NewClientFactory("0b352192-dcac-4cc7-992e-a96190ccc68c", cred, nil) | |
| clientFactory, err := armdataprotection.NewClientFactory("<subscription-id>", cred, nil) |
| log.Fatalf("failed to obtain a credential: %v", err) | ||
| } | ||
| ctx := context.Background() | ||
| clientFactory, err := armdataprotection.NewClientFactory("62b829ee-7936-40c9-a1c9-47a93f9f3965", cred, nil) |
Copilot
AI
Sep 18, 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.
Hard-coded subscription ID in example code should be replaced with a placeholder like <subscription-id> to avoid potential security issues if this example is copied to production code.
| clientFactory, err := armdataprotection.NewClientFactory("62b829ee-7936-40c9-a1c9-47a93f9f3965", cred, nil) | |
| clientFactory, err := armdataprotection.NewClientFactory("<subscription-id>", cred, nil) |
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
|
The breaking changes are introduced and approved in this PR, @jhendrixMSFT , please approve this major version release by adding label of Approved Major Version, thanks. |
https://github.com/Azure/sdk-release-request/issues/6483