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

Migrating Sphere to latest TypeSpec #24420

Merged
merged 10 commits into from
Jun 19, 2023
Merged

Conversation

allenjzhang
Copy link
Member

No description provided.

@openapi-workflow-bot
Copy link

Hi, @allenjzhang 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. [email protected]

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Jun 13, 2023

    Swagger Validation Report

    ️️✔️BreakingChange succeeded [Detail] [Expand]
    There are no breaking changes.
    compared swaggers (via Oad v0.10.4)] new version base version
    azuresphere.json 2022-09-01-preview(7c52935) 2022-09-01-preview(main)
    ️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️⚠️LintDiff: 0 Warnings warning [Detail]
    compared tags (via openapi-validator v2.1.3) new version base version
    package-2022-09-01-preview package-2022-09-01-preview(7c52935) package-2022-09-01-preview(main)

    The following errors/warnings exist before current PR submission:

    Rule Message
    OperationIdNounVerb Per the Noun_Verb convention for Operation Ids, the noun 'Devices' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Microsoft.AzureSphere/preview/2022-09-01-preview/azuresphere.json#L2474
    ⚠️ ListInOperationName Since operation response has model definition in array type, it should be of the form '_list'.
    Location: Microsoft.AzureSphere/preview/2022-09-01-preview/azuresphere.json#L2975
    ⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
    Location: Microsoft.AzureSphere/preview/2022-09-01-preview/azuresphere.json#L3490
    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️️✔️ApiReadinessCheck succeeded [Detail] [Expand]
    ️⚠️~[Staging] ServiceAPIReadinessTest: 0 Warnings warning [Detail]

    API Test is not triggered due to precheck failure. Check pipeline log for details.

    ️️✔️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 succeeded [Detail]
    Rule Message
    InConsistentSwagger "details":"The generated swagger file 2022-09-01-preview/azuresphere.json from typespec specification/sphere/Sphere.Management is not the same as the '/mnt/vss/_work/1/azure-rest-api-specs/specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/azuresphere.json' in PR,
    please make sure the swagger is consistent with the generated swagger. You can find the difference in the pipeline log."
    ️️✔️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 Jun 13, 2023

    Swagger Generation Artifacts

    ️️✔️ApiDocPreview succeeded [Detail] [Expand]
     Please click here to preview with your @microsoft account. 
    ️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]

    Breaking Changes Tracking



    ️️✔️ azure-sdk-for-net-track2 succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from 753f386. 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/sphere/Sphere.Management/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
    • ️✔️Azure.ResourceManager.Sphere [View full logs]  [Release SDK Changes]
      info	[Changelog]
    ️⚠️ azure-sdk-for-python warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from 753f386. 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.
      warn		specification/sphere/Sphere.Management/tspconfig.yaml skipped due to azure-sdk-for-python not found in tspconfig.yaml
      command	sh scripts/automation_generate.sh ../azure-sdk-for-python_tmp/generateInput.json ../azure-sdk-for-python_tmp/generateOutput.json
      cmderr	[automation_generate.sh]
      cmderr	[automation_generate.sh] npm notice New minor version of npm available! 9.5.1 -> 9.7.1
      cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.7.1>
      cmderr	[automation_generate.sh] npm notice Run `npm install -g [email protected]` to update!
      cmderr	[automation_generate.sh] npm notice
    • ️✔️track2_azure-mgmt-azuresphere [View full logs]  [Release SDK Changes]
      info	[Changelog]   - Initial Release
    ️⚠️ azure-sdk-for-java warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from 753f386. 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
    • ️✔️azure-resourcemanager-sphere [View full logs]  [Release SDK Changes]
    ️️✔️ azure-sdk-for-go succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from 753f386. SDK Automation 14.0.0
      command	sh ./eng/scripts/automation_init.sh ../../../../../azure-sdk-for-go_tmp/initInput.json ../../../../../azure-sdk-for-go_tmp/initOutput.json
      warn		specification/sphere/Sphere.Management/tspconfig.yaml skipped due to azure-sdk-for-go not found in tspconfig.yaml
      command	generator automation-v2 ../../../../../azure-sdk-for-go_tmp/generateInput.json ../../../../../azure-sdk-for-go_tmp/generateOutput.json
    • ️✔️sdk/resourcemanager/azuresphere/armazuresphere [View full logs]  [Release SDK Changes]
      info	[Changelog] This is a new package
      info	[Changelog]
    ️️✔️ azure-sdk-for-js succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from 753f386. 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
    • ️✔️@azure/arm-azuresphere [View full logs]  [Release SDK Changes]
      info	[Changelog]
      error	breakingChangeTracking is enabled, but version or changelogItem is not found in output.
    ️⚠️ azure-resource-manager-schemas warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from 753f386. Schema Automation 14.0.0
      command	.sdkauto/initScript.sh ../azure-resource-manager-schemas_tmp/initInput.json ../azure-resource-manager-schemas_tmp/initOutput.json
      cmderr	[initScript.sh] WARN old lockfile
      cmderr	[initScript.sh] npm WARN old lockfile The package-lock.json file was created with an old version of npm,
      cmderr	[initScript.sh] npm WARN old lockfile so supplemental metadata must be fetched from the registry.
      cmderr	[initScript.sh] npm WARN old lockfile
      cmderr	[initScript.sh] npm WARN old lockfile This is a one-time fix-up, please be patient...
      cmderr	[initScript.sh] npm WARN old lockfile
      warn	File azure-resource-manager-schemas_tmp/initOutput.json not found to read
      command	.sdkauto/generateScript.sh ../azure-resource-manager-schemas_tmp/generateInput.json ../azure-resource-manager-schemas_tmp/generateOutput.json
      warn	No file changes detected after generation
    • ️✔️sphere [View full logs
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Jun 13, 2023

    Generated ApiView

    Language Package Name ApiView Link
    Go sdk/resourcemanager/azuresphere/armazuresphere https://apiview.dev/Assemblies/Review/05a1b251d3e54a0d8635051cd0962149
    Java azure-resourcemanager-sphere https://apiview.dev/Assemblies/Review/33aa0e34547841dda4db3ac226d23c80
    .Net Azure.ResourceManager.Sphere https://apiview.dev/Assemblies/Review/b3bac56fc8e944f6a6e41261f39b984a
    JavaScript @azure/arm-azuresphere https://apiview.dev/Assemblies/Review/86657e77b3db4a5ea84a518d8d22c7cb

    Copy link
    Member

    @mikeharder mikeharder left a comment

    Choose a reason for hiding this comment

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

    This should be failing CI, because the folder added to eng/pipeline/typespec-ci.yml is incorrect. However, CI is ignoring this error rather than failing, which is a bug in CI I will fix: #24448

    After this bug is fixed, I'd like to verify this PR fails CI as-is, then I will fix the folder name in typespec-ci.yml.

    @mikeharder mikeharder self-assigned this Jun 15, 2023
    @mikeharder
    Copy link
    Member

    /azp run

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 2 pipeline(s).

    Copy link
    Member

    @mikeharder mikeharder left a comment

    Choose a reason for hiding this comment

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

    Failing CI due to several instances of this error:

    /mnt/vss/_work/1/s/specification/sphere/Sphere.Management/common.tsp:102:27
    error deprecated: Deprecated: object is deprecated. Please use {} for an empty model,
    `Record<unknown>` for a record with unknown property types, `unknown[]` for an array.
    

    https://dev.azure.com/azure-sdk/public/_build/results?buildId=2847944&view=logs&j=9cd39ef8-47c1-5b58-08db-8c3708712f1b&t=fc9dfc5e-afbb-5dcd-1f9e-c63049dbf79d&l=21

    @mikeharder
    Copy link
    Member

    /azp run

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 2 pipeline(s).

    @mikeharder
    Copy link
    Member

    /azp run

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 2 pipeline(s).

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

    Successfully merging this pull request may close these issues.

    4 participants