azure-sdk-for-net
azure-sdk-for-net copied to clipboard
Change to dynamically use the TagResource API
There are some environments like AzureStack which do not have the TagResource deployed. In these cases we need to fall back to use the PATCH/PUT methods for updating the tags for a given resource. The benefit to TagResource is it utilizes either the TagResource permission OR the write permission on the resource where as PATCH/PUT only works with write permission on the resource.
This change dynamically checks to see if the TagResource API is deployed in the current environment and switches which implementation it uses for manipulating tags. I also added an override in the options, if we don't want this we will need to find a way to override this at runtime in the test cases to test both cases.
Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.
API change check
APIView has identified API level changes in this PR and created following API reviews.
Azure.ResourceManager Azure.ResourceManager Azure.ResourceManager.AppService Azure.ResourceManager.Compute Azure.ResourceManager.Sql Azure.ResourceManager.MachineLearning Azure.ResourceManager.Network Azure.ResourceManager.KeyVault Azure.ResourceManager.Media Azure.ResourceManager.Logic Azure.ResourceManager.ManagedServiceIdentities Azure.ResourceManager.NotificationHubs Azure.ResourceManager.LabServices Azure.ResourceManager.CognitiveServices Azure.ResourceManager.Automation Azure.ResourceManager.SecurityCenter Azure.ResourceManager.DevTestLabs Azure.ResourceManager.NetApp Azure.ResourceManager.AppConfiguration
This pull request is protected by Check Enforcer. For more information about how to run a pipeline against this pull request, see this.
@m-nash this change is killing our machine pool because it is touching so many files which trigger all the pipelines. Every time a new commit is pushed we are requesting about 1000 agents which is backing up everything else trying to run. Can you please avoid pushing a lot of commits and only push when everything is complete? Also in the future if you are going to have a large change that touches all these files please reach out to EngSys first so we can come up with a plan to best handle this load.
@weshaggard spoke offline to come up with strategies on how to remove duplicate runs given the base library resourcemanager now runs all tests from all dependencies.
@ArthurMa1978 FYI
changes were merged in here https://github.com/Azure/azure-sdk-for-net/commit/49d50b33ccb348eb665cb3e27428ad095e09b449