Skip to content

Update ResourceManager SDK to 1.2.0-preview version. #2848

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

Merged
merged 5 commits into from
Aug 31, 2016

Conversation

TianoMS
Copy link

@TianoMS TianoMS commented Aug 28, 2016

This checklist is used to make sure that common issues in a pull request are covered by the creator. You can find a more complete discussion of PowerShell cmdlet best practices here.

Below in Overall Changes, check off the boxes that apply to your PR. Within each of the categories that you select, make sure that you can check off all of the boxes.

Overall Changes

General

  • Title of the PR is clear and informative
  • There are a small number of commits that each have an informative message
  • If it applies, references the bug/issue that the PR fixes
  • All files have the Microsoft copyright header
  • Cmdlets refer to management libraries through nuget references - no dlls are checked in
  • The PR does not introduce breaking changes (unless a major version change occurs in the assembly and module)

Tests

  • PR includes test coverage for the included changes
  • Tests must use xunit, and should either use Moq to mock management client calls, or use the scenario test framework
  • PowerShell scripts used in tests must not use hard-coded values for location
  • PowerShell scripts used in tests should do any necessary setup as part of the test or suite setup, and should not use hard-coded values for existing resources
  • Tests should not use App.config files for settings
  • Tests should use the built-in PowerShell functions for generating random names when unique names are necessary - this will store names in the test recording
  • Tests should use Start-Sleep to pause rather than Thread.Sleep

@TianoMS TianoMS changed the title Tiano d4 Update ResourceManager SDK to 1.1.5-preview version. Aug 28, 2016
@TianoMS
Copy link
Author

TianoMS commented Aug 30, 2016

@markcowl My change upgrades to Microsoft.Azure.Management.ResourceManager.1.1.5-preview. I did it only for the Resources solution. Most of the other projects are still using 1.1.1-preview version. Let me know if you see a problem in it.

@TianoMS
Copy link
Author

TianoMS commented Aug 30, 2016

@vivsriaus
Copy link
Contributor

@markcowl @hovsepm Adding on @TianoMS comment above regarding different versions of the same assembly. I recall there was an issue with the way powershell loaded assemblies that differed in just the maintenance version (1.1.1 vs 1.1.5). Since some projects reference 1.1.1 and ours (with this PR) reference 1.1.5, we want to ensure that this doesn't pose any problems for our cmdlets. i.e. - we don't have to force the powershell to load the 1.1.5 assembly via Add-Type to use it in our cmdlet.

@@ -116,7 +116,7 @@
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.TestFramework.1.3.4-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.TestFramework.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.TestFramework.1.3.6-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.TestFramework.dll</HintPath>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this intentional?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is about another issue. I think it's already fixed. Should not be a problem.

@vivsriaus
Copy link
Contributor

@TianoMS Since this is an api-version bump, why didn't we update the assembly's minor version instead (1.2.0 instead of 1.1.5)?

@TianoMS
Copy link
Author

TianoMS commented Aug 30, 2016

@vivsriaus I have another change in SDK (the parenthesis in resource group names) recently which updated the version to 1.1.6-preview. It's not published yet. Maybe we can update the version to 1.2.0 there.

@vivsriaus
Copy link
Contributor

Yes, let's please do that @TianoMS. api-version bumps definitely warrants at least a minor version update. We should be fine keeping the powershell changes as-is, since the implementation is internal.

@cormacpayne
Copy link
Member

@TianoMS Hey Tian, your on-demand build failed because of a bug in a test that we merged a fix for yesterday evening, so if you pull from dev and rebase, that should fix the problem.

@markcowl
Copy link
Member

LGTM once the on-demand build passes.

on demand: http://azuresdkci.cloudapp.net/view/1-AzurePowerShell/job/powershell-demand/1122/

@TianoMS
Copy link
Author

TianoMS commented Aug 30, 2016

@markcowl Please hold on with the merge. We have a newer version of SDK coming out. I'll push one more commit to upgrade to that version (1.2.0) directly.

@markcowl markcowl changed the title Update ResourceManager SDK to 1.1.5-preview version. [Hold]: Update ResourceManager SDK to 1.1.5-preview version. Aug 30, 2016
@TianoMS TianoMS changed the title [Hold]: Update ResourceManager SDK to 1.1.5-preview version. [Hold]: Update ResourceManager SDK to 1.2.0-preview version. Aug 30, 2016
@TianoMS
Copy link
Author

TianoMS commented Aug 30, 2016

@markcowl This is now ready to merge. On demand job:
http://azuresdkci.cloudapp.net/view/1-AzurePowerShell/job/powershell-demand/1126/

@TianoMS TianoMS changed the title [Hold]: Update ResourceManager SDK to 1.2.0-preview version. Update ResourceManager SDK to 1.2.0-preview version. Aug 30, 2016
@@ -153,7 +153,7 @@ public void GetsResourceProviderTests()
};
var pagableLocations = new Page<Location>();
pagableLocations.SetItemValue<Location>(locationList);
var locationsResult = new AzureOperationResponse<IPage<Location>>()
var locationsResult = new AzureOperationResponse<IEnumerable<Location>>()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change - why is this operation no longer pageable?

Copy link
Author

@TianoMS TianoMS Aug 31, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change really happens here: Azure/azure-rest-api-specs@5129caa.

At the bottom, it sets "nextLinkName" to null. This makes the generated SDK not pageable. ISubscriptionsOperations.ListLocationsWithHttpMessagesAsync now returns IEnumerable.

It's not a breaking change here. It's a breaking change in .NET SDK. I can sync up with Vivek on that change in swagger spec.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TianoMS @markcowl That is correct. The list subscription locations was never pageable to begin with, it was incorrectly added. The above change to swagger spec @TianoMS referenced fixed the issue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as it's not a breaking change here, it's OK, but IMO, you want to fix this in the sdk, you don't want to go from pageange to not pageable back to pageable

@markcowl
Copy link
Member

@TianoMS One question about the removal of a pageable operation

@TianoMS
Copy link
Author

TianoMS commented Aug 31, 2016

@markcowl Addressed.

@markcowl markcowl merged commit ec2a0c7 into Azure:dev Aug 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants