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

[TypeSpec-Clean]: Updating HealthInsights #23966

Merged
merged 4 commits into from
May 13, 2023
Merged

[TypeSpec-Clean]: Updating HealthInsights #23966

merged 4 commits into from
May 13, 2023

Conversation

markcowl
Copy link
Member

@markcowl markcowl commented May 12, 2023

@markcowl markcowl requested a review from yangyuan as a code owner May 12, 2023 22:12
@openapi-workflow-bot
Copy link

Hi, @markcowl 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 May 12, 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: 0 Errors, 2 Warnings failed [Detail]
    Rule Message
    ⚠️ Failed to generate TypeSpec APIView. Please check the detail log and make sure TypeSpec compiler version is the latest. "How to fix":"Check the detailed log and verify if the TypeSpec emitter is able to create API review file for the changes in PR."
    ⚠️ Failed to generate TypeSpec APIView. Please check the detail log and make sure TypeSpec compiler version is the latest. "How to fix":"Check the detailed log and verify if the TypeSpec emitter is able to create API review file for the changes in PR."
    ️️✔️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: 20 Errors, 5 Warnings failed [Detail]
    Rule Message
    import-not-found Couldn't resolve import "@azure-tools/typespec-client-generator-core"
    Location: specification/cognitiveservices/ContentSafety/routes.tsp#L2
    invalid-ref Namespace Azure doesn't have member ClientGenerator
    Location: specification/cognitiveservices/ContentSafety/routes.tsp#L12
    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#L13
    unknown-identifier Unknown identifier convenientAPI
    Location: specification/cognitiveservices/OpenAI.Inference/routes.tsp#L20
    unknown-decorator Unknown decorator
    Location: specification/cognitiveservices/OpenAI.Inference/routes.tsp#L20
    unknown-identifier Unknown identifier convenientAPI
    Location: specification/cognitiveservices/OpenAI.Inference/routes.tsp#L31
    unknown-decorator Unknown decorator
    Location: specification/cognitiveservices/OpenAI.Inference/routes.tsp#L31
    unknown-identifier Unknown identifier convenientAPI
    Location: specification/cognitiveservices/OpenAI.Inference/routes.tsp#L42
    unknown-decorator Unknown decorator
    Location: specification/cognitiveservices/OpenAI.Inference/routes.tsp#L42
    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?

    @ghost ghost added the Cognitive Services label May 12, 2023
    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented May 12, 2023

    Swagger Generation Artifacts

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

    Breaking Changes Tracking

    ️❌ azure-sdk-for-net-track2 failed [Detail]
    • Code Generator Failed [Logs]Release - Generate from 2bfcaad. 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
      warn		specification/cognitiveservices/HealthInsights/healthinsights.openapi/tspconfig.yaml skipped due to azure-sdk-for-net-track2 not found in tspconfig.yaml
      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;1mException: �[0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/Invoke-GenerateAndBuildV2.ps1:133
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1mLine |
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m 133 | �[0m             �[36;1mthrow "Not provide service name or namespace."�[0m
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m     | �[31;1m             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[36;1m     | �[31;1mNot provide service name or namespace.
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[0m
      error	Script return with result [failed] code [1] signal [null] cwd [azure-sdk-for-net]: pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1
      warn	Skip package processing as generation is failed
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented May 12, 2023

    Swagger pipeline restarted successfully. If there is ApiView generated, it will be updated in this comment.

    Respondign to review comments
    
    Co-authored-by: Mike Harder <mharder@microsoft.com>
    @markcowl
    Copy link
    Member Author

    @mikeharder I made one change - the service name is set from the root namespace, which does not match where this swagger should be emitted. I used the literal service name rather than the interpolated variable, rather than changing the namespace.

    @mikeharder
    Copy link
    Member

    @mikeharder I made one change - the service name is set from the root namespace, which does not match where this swagger should be emitted. I used the literal service name rather than the interpolated variable, rather than changing the namespace.

    Should we change the namespace instead?

    I'm fine if we want to fix this in a later PR, and for now only make changes required to successfully build the folder. But longer-term I think we want to align all the existing specs folders in the repo as much as we can.

    So if the convention is the swagger should be emitted to a folder named the same as the namespace, I'd like to make this consistent across specs.

    @markcowl markcowl merged commit 2bfcaad into Azure:main May 13, 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.

    3 participants