Skip to content

Conversation

@quintinb
Copy link
Contributor

This change updates the Media Services SDK to support the 2nd preview version (2018-06-01-preview).

Changes from the 2018-03-30-preview version include:

  1. Add AlternativeMediaId to StreamingLocator and to the LiveEvent preview.
  2. Add CorrelationData to the Job entity to allow customers to supply data that will be echoed in Job related events.
  3. Change Type of ContentKeys in StreamingLocatorProperty from StreamingLocatorUserDefinedContentKey to StreamingLocatorContentKey. This allows the ContentKeyId information to be available when a user creates a StreamingLocator even for ContentKeys created by MediaServices.
  4. Rename CustomLicenseAcquisitionUrlTemplate to CustomKeyAcquisitionUrlTemplate for EnvelopeEncryption.

This is based off the swagger spec in pull request Azure/azure-rest-api-specs#3177 which is approved and waiting to be merged.

Tests have been updated with the new API versions. API version updated in the csproj and assemblyinfo.cs.

return new Tuple<string, string, string>[]
{
new Tuple<string, string, string>("Media", "Assets", "2018-06-01-preview"),
new Tuple<string, string, string>("Media", "ContentKeyPolicies", "2018-06-01-preview"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Please run msbuild build.proj /t:build /p:Scope=SDKs\Media and commit changes to the .props file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ran "msbuild build.proj /t:build /p:Scope=SDKs\Media" and the build succeeds but it didn't produce any changes to the .props file. I also did a "git clean -xdf", then "msbuild build.proj", and then "msbuild build.proj /t:build /p:Scope=SDKs\Media" but still no update to the props file. Any suggestions?


[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: AssemblyVersion("1.0.1")]
Copy link
Contributor

Choose a reason for hiding this comment

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

AssemblyVersion must remain the same, AssemblyFileVersion must be updated

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, fixed.

Assert.Equal(expectedAssetName, locator.AssetName);
Assert.Equal(expectedName, locator.Name);
Assert.Empty(locator.ContentKeys);
//Assert.NotEmpty(locator.ContentKeys); // TODO: This is currently not implemented consistently. Verify it once it is
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Please delete this line instead of commenting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

new Tuple<string, string, string>("Media", "Assets", "2018-06-01-preview"),
new Tuple<string, string, string>("Media", "ContentKeyPolicies", "2018-06-01-preview"),
new Tuple<string, string, string>("Media", "Jobs", "2018-06-01-preview"),
new Tuple<string, string, string>("Media", "LiveEvents", "2018-06-01-preview"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for trying that @quintinb
Please replace Media_2018-03-30 with Media_2018-06-01 here and we are good to go

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -1,80 +0,0 @@
// <auto-generated>
Copy link
Contributor

Choose a reason for hiding this comment

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

@quintinb Apologize for missing this. Deleting a model type could be a breaking change to users. Please bump the version to 2.0.0 in the csproj
I also see that the API version is preview but the SDKs generated are stable, this is usually not recommended.
@shahabhijeet Please confirm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I bumped the version number as requested. Generating the SDKs as stable was not intentional. Can you advise on how to generate them as preview next time? Is it by adding preview to the version string instead of just numbers? Thanks.

<PackageId>Microsoft.Azure.Management.Media</PackageId>
<Description>Provides developers with libraries for managing Azure Media Services using the Azure Resource Manager API.</Description>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionPrefix>1.0.1</VersionPrefix>
Copy link
Contributor

Choose a reason for hiding this comment

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

@quintinb any reason you are creating a stable package out of a preview API version?
API version change will have to be reflected on the SDK version with a major version bump.

StreamingEndpoints = new StreamingEndpointsOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
ApiVersion = "2018-03-30-preview";
ApiVersion = "2018-06-01-preview";
Copy link
Contributor

Choose a reason for hiding this comment

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

@quintinb as the API version is changing, you will need to bump up major version for the SDK.
Also the comments below about creating stable package out of preview spec is something that is odd and would like to get clarification on that one.

Copy link
Contributor

@shahabhijeet shahabhijeet left a comment

Choose a reason for hiding this comment

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

This is good to go, once the CI passes

@shahabhijeet shahabhijeet merged commit d422870 into Azure:psSdkJson6 Jun 26, 2018
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.

3 participants