fix(azure): restore deprecated non-Context wrappers for backward compatibility#1754
Open
james00012 wants to merge 2 commits intomainfrom
Open
fix(azure): restore deprecated non-Context wrappers for backward compatibility#1754james00012 wants to merge 2 commits intomainfrom
james00012 wants to merge 2 commits intomainfrom
Conversation
denis256
approved these changes
Apr 12, 2026
| // | ||
| // Deprecated: Use [AvailabilitySetExistsContextE] instead. | ||
| func AvailabilitySetExistsE(t testing.TestingT, avsName string, resGroupName string, subscriptionID string) (bool, error) { | ||
| return AvailabilitySetExistsContextE(t, context.Background(), avsName, resGroupName, subscriptionID) |
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.
Summary
Restores deprecated non-Context wrapper functions that were deleted in PRs #1740-#1742 during the Azure SDK migration. These wrappers delegate to Context variants with
context.Background()for backward compatibility, following the pattern established inservicebus.go.Note: the wrappers return new SDK types (e.g.,
*armcompute.VirtualMachine) since the Context functions they delegate to were already migrated. Consumers who only call these functions without accessing fields will compile as before. Those accessing fields will need to update to the new SDK's nestedPropertiespattern.Files changed (10):
compute.go— restored ~22 deprecated wrappersdisk.go— restored ~4 deprecated wrappersavailabilityset.go— restored ~9 deprecated wrappersnsg.go— restored ~2 deprecated wrappersnetworkinterface.go— restored ~6 deprecated wrapperspublicaddress.go— restored ~7 deprecated wrappersloadbalancer.go— restored ~10 deprecated wrappersvirtualnetwork.go— restored ~12 deprecated wrappersstorage.go— restored ~18 deprecated wrapperscosmosdb.go— restored ~10 deprecated wrappersNo existing functions modified. No test changes. Purely additive.
Validated
go build ./...go test -tags azure -c -o /dev/null ./modules/azure/...go test ./modules/azure/...— all unit tests passmake lint— 0 issues