Skip to content

[Cognitive Services] Upgrade to 2021-04-30 #15133

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 Jun 22, 2021
Merged

[Cognitive Services] Upgrade to 2021-04-30 #15133

merged 5 commits into from Jun 22, 2021

Conversation

yangyuan
Copy link
Member

@yangyuan yangyuan commented May 27, 2021

Description

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
      • {Please put the link here}
    • the markdown help files have been regenerated using the commands listed here

@msJinLei
Copy link
Contributor

@yangyuan
You commit includes a lot of breaking changes which cannot be merged to master.
If all the breaking changes are required for SDK upgrading, you have to wait until next major release.
if not, you can extract essential changes and covert them to unbreaking ones.

@yangyuan
Copy link
Member Author

yangyuan commented Jun 1, 2021

@msJinLei is next major release on Oct?

Most of the changes are related to SDK. Let me see if I can do something in here to avoid breaking changes.

Some of the changes are marked as breaking but it's actually bug fix, for example ActionRequired is removed from PrivateLinkServiceConnectionState.
The field ActionRequired was incorrectly defined in SDK, we got breaking change approval a while ago for this bugfix, the real name should be ActionsRequired.

@msJinLei
Copy link
Contributor

msJinLei commented Jun 2, 2021

@msJinLei is next major release on Oct?

Most of the changes are related to SDK. Let me see if I can do something in here to avoid breaking changes.

Some of the changes are marked as breaking but it's actually bug fix, for example ActionRequired is removed from PrivateLinkServiceConnectionState.
The field ActionRequired was incorrectly defined in SDK, we got breaking change approval a while ago for this bugfix, the real name should be ActionsRequired.

I understand your point. However, Azure PowerShell prevents any breaking changes being released in non-breaking change release.

  "AssemblyFileName","ClassName","Target","Severity","ProblemId","Description","Remediation"
  "Az.CognitiveServices","Microsoft.Azure.Commands.Management.CognitiveServices.GetAzureCognitiveServicesAccountCommand","Get-AzCognitiveServicesAccount","0","3030","The generic type for 'property Type' has been changed from 'System.Nullable`1[Microsoft.Azure.Management.CognitiveServices.Models.IdentityType]' to 'System.Nullable`1[Microsoft.Azure.Management.CognitiveServices.Models.ResourceIdentityType]'. ","Change the generic type for 'property Type' back to 'System.Nullable`1[Microsoft.Azure.Management.CognitiveServices.Models.IdentityType]'."
  "Az.CognitiveServices","Microsoft.Azure.Commands.Management.CognitiveServices.GetAzureCognitiveServicesAccountCommand","Get-AzCognitiveServicesAccount","0","3000","The type of property 'Tier' of type 'Microsoft.Azure.Management.CognitiveServices.Models.Sku' has changed from 'System.Nullable`1[Microsoft.Azure.Management.CognitiveServices.Models.SkuTier]' to 'System.String'.","Change the type of property 'Tier' back to 'System.Nullable`1[Microsoft.Azure.Management.CognitiveServices.Models.SkuTier]'."
  "Az.CognitiveServices","Microsoft.Azure.Commands.Management.CognitiveServices.GetAzureCognitiveServicesAccountCommand","Get-AzCognitiveServicesAccount","0","3010","The property 'ActionRequired' of type 'Microsoft.Azure.Management.CognitiveServices.Models.PrivateLinkServiceConnectionState' has been removed.","Add the property 'ActionRequired' back to type 'Microsoft.Azure.Management.CognitiveServices.Models.PrivateLinkServiceConnectionState'."

If no way to work around these breaking changes, you have to release them in next major release.

@yangyuan
Copy link
Member Author

yangyuan commented Jun 3, 2021

Hi @msJinLei , few things:

  1. Can you check that if everything else are fine, except for the last 3 breaking changes.
  2. Due to legal concern we might have to update PowerShell to latest RP version.
    2.1. It seems to be impossible to fix the last few breaking changes with latest SDK. Is there any way to request exception?
    2.2. I can, also, copy the majority of SDK code to this repo, and modify it to make it compatible with old version. Thus we get rid of SDK dependency (temporary), and re-introduce it in next major release.

@msJinLei
Copy link
Contributor

msJinLei commented Jun 7, 2021

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@msJinLei
Copy link
Contributor

msJinLei commented Jun 7, 2021

Hi @msJinLei , few things:

  1. Can you check that if everything else are fine, except for the last 3 breaking changes.

Please refer to other review comments.

  1. Due to legal concern we might have to update PowerShell to latest RP version.
    2.1. It seems to be impossible to fix the last few breaking changes with latest SDK. Is there any way to request exception?
    2.2. I can, also, copy the majority of SDK code to this repo, and modify it to make it compatible with old version. Thus we get rid of SDK dependency (temporary), and re-introduce it in next major release.

I check breaking change items one by one but cannot the following change.

"Az.CognitiveServices","Microsoft.Azure.Commands.Management.CognitiveServices.GetAzureCognitiveServicesAccountCommand","Get-AzCognitiveServicesAccount","0","3010","The property 'ActionRequired' of type 'Microsoft.Azure.Management.CognitiveServices.Models.PrivateLinkServiceConnectionState' has been removed."

I check the class definition. ActionRequired is not removed.

#region Assembly Microsoft.Azure.Management.CognitiveServices, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// C:\Users\leijin\.nuget\packages\microsoft.azure.management.cognitiveservices\8.0.0-preview\lib\netstandard2.0\Microsoft.Azure.Management.CognitiveServices.dll
#endregion

using Newtonsoft.Json;

namespace Microsoft.Azure.Management.CognitiveServices.Models
{
    //
    // Summary:
    //     A collection of information about the state of the connection between service
    //     consumer and provider.
    public class PrivateLinkServiceConnectionState
    {
        //
        // Summary:
        //     Initializes a new instance of the PrivateLinkServiceConnectionState class.
        public PrivateLinkServiceConnectionState();
        //
        // Summary:
        //     Initializes a new instance of the PrivateLinkServiceConnectionState class.
        //
        // Parameters:
        //   status:
        //     Indicates whether the connection has been Approved/Rejected/Removed by the owner
        //     of the service. Possible values include: 'Pending', 'Approved', 'Rejected'
        //
        //   description:
        //     The reason for approval/rejection of the connection.
        //
        //   actionsRequired:
        //     A message indicating if changes on the service provider require any updates on
        //     the consumer.
        public PrivateLinkServiceConnectionState(string status = null, string description = null, string actionsRequired = null);

        //
        // Summary:
        //     Gets or sets indicates whether the connection has been Approved/Rejected/Removed
        //     by the owner of the service. Possible values include: 'Pending', 'Approved',
        //     'Rejected'
        [JsonProperty(PropertyName = "status")]
        public string Status { get; set; }
        //
        // Summary:
        //     Gets or sets the reason for approval/rejection of the connection.
        [JsonProperty(PropertyName = "description")]
        public string Description { get; set; }
        //
        // Summary:
        //     Gets or sets a message indicating if changes on the service provider require
        //     any updates on the consumer.
        [JsonProperty(PropertyName = "actionsRequired")]
        public string ActionsRequired { get; set; }
    }
}

Could you double confirm whether ActionRequired is removed?

For the following two items, please try to use automapper to work around, which is something like azure-powershell\src\Network\Network\Common\NetworkResourceManagerProfile.cs.

"Az.CognitiveServices","Microsoft.Azure.Commands.Management.CognitiveServices.GetAzureCognitiveServicesAccountCommand","Get-AzCognitiveServicesAccount","0","3030","The generic type for 'property Type' has been changed from 'System.Nullable`1[Microsoft.Azure.Management.CognitiveServices.Models.IdentityType]' to 'System.Nullable`1[Microsoft.Azure.Management.CognitiveServices.Models.ResourceIdentityType]'. ","Change the generic type for 'property Type' back to 'System.Nullable`1[Microsoft.Azure.Management.CognitiveServices.Models.IdentityType]'."

"Az.CognitiveServices","Microsoft.Azure.Commands.Management.CognitiveServices.GetAzureCognitiveServicesAccountCommand","Get-AzCognitiveServicesAccount","0","3000","The type of property 'Tier' of type 'Microsoft.Azure.Management.CognitiveServices.Models.Sku' has changed from 'System.Nullable`1[Microsoft.Azure.Management.CognitiveServices.Models.SkuTier]' to 'System.String'.","Change the type of property 'Tier' back to 'System.Nullable`1[Microsoft.Azure.Management.CognitiveServices.Models.SkuTier]'."
  

@yangyuan
Copy link
Member Author

yangyuan commented Jun 7, 2021

@msJinLei ActionRequired is removed, what you can see in PrivateLinkServiceConnectionState is Action s Required .

Thanks for feedback, I'm DRI this week but will get back to you as soon as I get time.

@msJinLei msJinLei closed this Jun 8, 2021
@yangyuan yangyuan reopened this Jun 22, 2021
@yangyuan yangyuan merged commit 855cfd5 into Azure:master Jun 22, 2021
@BethanyZhou
Copy link
Contributor

why you can merge commit 855cfd5 into master branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants