Skip to content
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

[AnomalyDetector] Fix for SDK clients due to associative arrays #23664

Merged
merged 3 commits into from
Apr 26, 2023

Conversation

catalinaperalta
Copy link
Member

@catalinaperalta catalinaperalta commented Apr 20, 2023

Turn off @convenientAPI generation for DetectUnivariateEntireSeries.
Also, cleaned up client.tsp, using @convenientAPI with a true value is redundant since the convenience methods are now generated by default.

NOTE: The change to DetectUnivariateEntireSeries affects .NET and Java, this method should be handwritten

@openapi-workflow-bot
Copy link

Hi, @catalinaperalta Thanks for your PR. I am workflow bot for review process. Here are some small tips.

  • Please ensure to do self-check against checklists in first PR comment.
  • PR assignee is the person auto-assigned and responsible for your current PR reviewing and merging.
  • For specs comparison cross API versions, Use API Specs Comparison Report Generator
  • If there is CI failure(s), to fix CI error(s) is mandatory for PR merging; or you need to provide justification in PR comment for explanation. How to fix?

  • Any feedback about review process or workflow bot, pls contact swagger and tools team. vscswagger@microsoft.com

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Apr 20, 2023

    Swagger Validation Report

    ️️✔️BreakingChange succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️️✔️LintDiff succeeded [Detail] [Expand]
    Validation passes for LintDiff.
    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️️✔️ApiReadinessCheck succeeded [Detail] [Expand]
    ️️✔️~[Staging] ServiceAPIReadinessTest succeeded [Detail] [Expand]
    Validation passes for ServiceAPIReadinessTest.
    ️️✔️SwaggerAPIView succeeded [Detail] [Expand]
    ️️✔️CadlAPIView succeeded [Detail] [Expand]
    ️️✔️TypeSpecAPIView succeeded [Detail] [Expand]
    ️️✔️ModelValidation succeeded [Detail] [Expand]
    Validation passes for ModelValidation.
    ️️✔️SemanticValidation succeeded [Detail] [Expand]
    Validation passes for SemanticValidation.
    ️️✔️PoliCheck succeeded [Detail] [Expand]
    Validation passed for PoliCheck.
    ️️✔️PrettierCheck succeeded [Detail] [Expand]
    Validation passes for PrettierCheck.
    ️️✔️SpellCheck succeeded [Detail] [Expand]
    Validation passes for SpellCheck.
    ️️✔️Lint(RPaaS) succeeded [Detail] [Expand]
    Validation passes for Lint(RPaaS).
    ️️✔️CadlValidation succeeded [Detail] [Expand]
    Validation passes for CadlValidation.
    ️❌TypeSpec Validation: 17 Errors, 5 Warnings failed [Detail]
    Rule Message
    unknown-identifier Unknown identifier Cadl
    Location: specification/cognitiveservices/OpenAI.Authoring/model.routes.tsp#L9
    unknown-identifier Unknown identifier Cadl
    Location: specification/cognitiveservices/OpenAI.Authoring/model.routes.tsp#L10
    unknown-identifier Unknown identifier Cadl
    Location: specification/cognitiveservices/OpenAI.Authoring/finetune.tsp#L93
    unknown-decorator Unknown decorator
    Location: specification/cognitiveservices/OpenAI.Authoring/finetune.tsp#L93
    unknown-identifier Unknown identifier route
    Location: specification/cognitiveservices/OpenAI.Authoring/model.routes.tsp#L27
    unknown-decorator Unknown decorator
    Location: specification/cognitiveservices/OpenAI.Authoring/model.routes.tsp#L27
    unknown-identifier Unknown identifier get
    Location: specification/cognitiveservices/OpenAI.Authoring/model.routes.tsp#L28
    unknown-decorator Unknown decorator
    Location: specification/cognitiveservices/OpenAI.Authoring/model.routes.tsp#L28
    import-not-found Couldn't resolve import "@azure-tools/typespec-client-generator-core"
    Location: specification/cognitiveservices/OpenAI.Inference/routes.tsp#L4
    invalid-ref Namespace Azure doesn't have member ClientGenerator
    Location: specification/cognitiveservices/OpenAI.Inference/routes.tsp#L12
    unknown-identifier Unknown identifier convenientAPI
    Location: specification/cognitiveservices/OpenAI.Inference/routes.tsp#L19
    unknown-decorator Unknown decorator
    Location: specification/cognitiveservices/OpenAI.Inference/routes.tsp#L19
    unknown-identifier Unknown identifier convenientAPI
    Location: specification/cognitiveservices/OpenAI.Inference/routes.tsp#L26
    unknown-decorator Unknown decorator
    Location: specification/cognitiveservices/OpenAI.Inference/routes.tsp#L26
    SwaggerNotExistInPR "details":"The generated swagger file specification/cognitiveservices/AnomalyDetector/openapi.json from typespec specification/cognitiveservices/AnomalyDetector is not in the PR,
    please make sure it presents into the PR."
    MissingExamplesDirectory "details":"The 'examples' directory is missing in the typespec folder specification/cognitiveservices/OpenAI.Authoring,
    please ensure the 'examples' is added in the PR."
    MissingExamplesDirectory "details":"The 'examples' directory is missing in the typespec folder specification/cognitiveservices/OpenAI.Inference,
    please ensure the 'examples' is added in the PR."
    ⚠️ MissingTypeSpecProjectConfig "details":"The configuration 'azure-resource-provider-folder' for '@azure-tools/typespec-autorest' is missing in the tspconfig.yaml under folder specification/cognitiveservices/AnomalyDetector,
    please ensure it is added in the configuration of the emitter '@azure-tools/typespec-autorest'."
    ⚠️ MissingTypeSpecProjectConfig "details":"The configuration 'output-file' for '@azure-tools/typespec-autorest' is missing in the tspconfig.yaml under folder specification/cognitiveservices/OpenAI.Authoring,
    please ensure it is added in the configuration of the emitter '@azure-tools/typespec-autorest'."
    ⚠️ MissingTypeSpecProjectConfig "details":"The configuration 'azure-resource-provider-folder' for '@azure-tools/typespec-autorest' is missing in the tspconfig.yaml under folder specification/cognitiveservices/OpenAI.Authoring,
    please ensure it is added in the configuration of the emitter '@azure-tools/typespec-autorest'."
    ⚠️ MissingTypeSpecProjectConfig "details":"The configuration 'output-file' for '@azure-tools/typespec-autorest' is missing in the tspconfig.yaml under folder specification/cognitiveservices/OpenAI.Inference,
    please ensure it is added in the configuration of the emitter '@azure-tools/typespec-autorest'."
    ⚠️ MissingTypeSpecProjectConfig "details":"The configuration 'azure-resource-provider-folder' for '@azure-tools/typespec-autorest' is missing in the tspconfig.yaml under folder specification/cognitiveservices/OpenAI.Inference,
    please ensure it is added in the configuration of the emitter '@azure-tools/typespec-autorest'."
    ️️✔️PR Summary succeeded [Detail] [Expand]
    Validation passes for Summary.
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Apr 20, 2023

    Swagger Generation Artifacts

    ️️✔️ApiDocPreview succeeded [Detail] [Expand]
    ️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]

    Breaking Changes Tracking


    ️⚠️ azure-sdk-for-python warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from b69d13e. SDK Automation 14.0.0
      command	sh scripts/automation_init.sh ../azure-sdk-for-python_tmp/initInput.json ../azure-sdk-for-python_tmp/initOutput.json
      cmderr	[automation_init.sh] WARNING: Skipping azure-nspkg as it is not installed.
      command	sh scripts/automation_generate.sh ../azure-sdk-for-python_tmp/generateInput.json ../azure-sdk-for-python_tmp/generateOutput.json
      cmderr	[automation_generate.sh]  notice
      cmderr	[automation_generate.sh] npm notice New minor version of npm available! 9.5.0 -> 9.6.5
      cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.6.5>
      cmderr	[automation_generate.sh] npm notice Run `npm install -g npm@9.6.5` to update!
      cmderr	[automation_generate.sh] npm notice
    • ️✔️azure-ai-anomalydetector [View full logs]  [Release SDK Changes]
      info	[Changelog] data-plan skip changelog generation temporarily
    ️⚠️ azure-sdk-for-java warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from b69d13e. SDK Automation 14.0.0
      command	./eng/mgmt/automation/init.sh ../azure-sdk-for-java_tmp/initInput.json ../azure-sdk-for-java_tmp/initOutput.json
      cmderr	[init.sh] [notice] A new release of pip is available: 23.0.1 -> 23.1.2
      cmderr	[init.sh] [notice] To update, run: pip install --upgrade pip
      cmderr	[init.sh] [notice] A new release of pip is available: 23.0.1 -> 23.1.2
      cmderr	[init.sh] [notice] To update, run: pip install --upgrade pip
      command	./eng/mgmt/automation/generate.py ../azure-sdk-for-java_tmp/generateInput.json ../azure-sdk-for-java_tmp/generateOutput.json
      cmderr	[generate.py] npm notice
      cmderr	[generate.py] npm notice New major version of npm available! 8.19.4 -> 9.6.5
      cmderr	[generate.py] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.6.5>
      cmderr	[generate.py] npm notice Run `npm install -g npm@9.6.5` to update!
      cmderr	[generate.py] npm notice
    • ️✔️azure-ai-anomalydetector [View full logs]  [Release SDK Changes]
    ️❌ azure-sdk-for-net-track2 failed [Detail]
    • Failed [Logs]Release - Generate from b69d13e. SDK Automation 14.0.0
      command	pwsh ./eng/scripts/Automation-Sdk-Init.ps1 ../azure-sdk-for-net_tmp/initInput.json ../azure-sdk-for-net_tmp/initOutput.json
      command	pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1 ../azure-sdk-for-net_tmp/generateInput.json ../azure-sdk-for-net_tmp/generateOutput.json
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1mGeneratePackage: �[0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/Invoke-GenerateAndBuildV2.ps1:145
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1mLine |
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m 145 | �[0m         �[36;1mGeneratePackage `�[0m
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m     | �[31;1m         ~~~~~~~~~~~~~~~~~
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[36;1m     | �[31;1mFailed to build sdk. exit code: False
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[0m
    • Azure.AI.AnomalyDetector [View full logs]  [Release SDK Changes]
      info	[Changelog]
    ️️✔️ azure-sdk-for-js succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from b69d13e. SDK Automation 14.0.0
      command	sh .scripts/automation_init.sh ../azure-sdk-for-js_tmp/initInput.json ../azure-sdk-for-js_tmp/initOutput.json
      warn	File azure-sdk-for-js_tmp/initOutput.json not found to read
      command	sh .scripts/automation_generate.sh ../azure-sdk-for-js_tmp/generateInput.json ../azure-sdk-for-js_tmp/generateOutput.json
      cmderr	[automation_generate.sh] [ERROR] Generate changelog failed: ENOENT: no such file or directory, open '/mnt/vss/_work/1/s/azure-sdk-for-js/sdk/anomalydetector/ai-anomaly-detector-rest/changelog-temp/package/CHANGELOG.md'
    • ️✔️@azure-rest/ai-anomaly-detector [View full logs]  [Release SDK Changes]
      info	[Changelog]
      error	breakingChangeTracking is enabled, but version or changelogItem is not found in output.
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Apr 20, 2023

    Generated ApiView

    Language Package Name ApiView Link
    Python azure-ai-anomalydetector https://apiview.dev/Assemblies/Review/0b0cc19f90f74e51ace9b355d02efc7c
    .Net Azure.AI.AnomalyDetector https://apiview.dev/Assemblies/Review/7d306f43d6b448ac8b7e9783e1fac51d
    Java azure-ai-anomalydetector https://apiview.dev/Assemblies/Review/480ac12b406341158a69c94122d69604
    JavaScript @azure-rest/ai-anomaly-detector Create ApiView failed. Please ensure your github account in Azure/Microsoft is public and add a comment "/azp run" to re-trigger the CI.

    @catalinaperalta catalinaperalta changed the title [AnomalyDetector] Associative arrays solution for SDK clients [AnomalyDetector] Associative arrays fix for SDK clients Apr 20, 2023
    @catalinaperalta catalinaperalta changed the title [AnomalyDetector] Associative arrays fix for SDK clients [AnomalyDetector] Fix for SDK clients due to associative arrays Apr 20, 2023
    Copy link
    Member

    @srnagar srnagar left a comment

    Choose a reason for hiding this comment

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

    LGTM!

    Added options for ts emitter java emitter.
    @weidongxu-microsoft
    Copy link
    Member

    /azp run

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @MaryGao
    Copy link
    Member

    MaryGao commented Apr 24, 2023

    /azp run

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @mikekistler
    Copy link
    Member

    I have added myself as a reviewer so that I can recommend changes based on the Python and (ongoing) .NET user studies.

    @raych1
    Copy link
    Member

    raych1 commented Apr 25, 2023

    /azp run

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @catalinaperalta catalinaperalta marked this pull request as ready for review April 25, 2023 22:32
    @tjprescott tjprescott merged commit b69d13e into main Apr 26, 2023
    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.

    8 participants