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

Rename property in sample ContosoWidgetManager #23836

Merged
merged 7 commits into from
May 11, 2023

Conversation

mikeharder
Copy link
Member

@mikeharder mikeharder commented May 5, 2023

@mikeharder mikeharder requested a review from a team as a code owner May 5, 2023 23:03
@mikeharder mikeharder requested review from DominikMe and weidongxu-microsoft and removed request for a team May 5, 2023 23:03
@openapi-workflow-bot
Copy link

Hi, @mikeharder 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 5, 2023

    Swagger Validation Report

    ️❌BreakingChange: 6 Errors, 0 Warnings failed [Detail]
    compared swaggers (via Oad v0.10.4)] new version base version
    widgets.json 2022-11-01-preview(cdbbf04) 2022-11-01-preview(main)
    Rule Message
    1033 - RemovedProperty The new version is missing a property found in the old version. Was 'createdDate' renamed or removed?
    New: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L425:7
    Old: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L425:7
    1033 - RemovedProperty The new version is missing a property found in the old version. Was 'createdDate' renamed or removed?
    New: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L444:7
    Old: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L444:7
    1034 - AddedRequiredProperty The new version has new required property 'createdAt' that was not found in the old version.
    New: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L425:7
    Old: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L425:7
    1034 - AddedRequiredProperty The new version has new required property 'createdAt' that was not found in the old version.
    New: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L485:9
    Old: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L485:9
    1034 - AddedRequiredProperty The new version has new required property 'createdAt' that was not found in the old version.
    New: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L423:5
    Old: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L423:5
    1045 - AddedOptionalProperty The new version has a new optional property 'createdAt' that was not found in the old version.
    New: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L444:7
    Old: Azure.Contoso.WidgetManager/preview/2022-11-01-preview/widgets.json#L444:7
    ️️✔️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.
    compared tags (via openapi-validator v2.0.1) new version base version
    package-2022-11-01-preview package-2022-11-01-preview(cdbbf04) package-2022-11-01-preview(main)
    ️️✔️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: 0 Errors, 0 Warnings failed [Detail]
    ️️✔️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] [Expand]
    Validation passes for TypeSpec Validation.
    ️️✔️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 May 5, 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-python warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from fb9c8e2. 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/contosowidgetmanager/data-plane/readme.md skipped due to azure-sdk-for-python not found in swagger-to-sdk
      command	sh scripts/automation_generate.sh ../azure-sdk-for-python_tmp/generateInput.json ../azure-sdk-for-python_tmp/generateOutput.json
      cmderr	[automation_generate.sh] npm notice
      cmderr	[automation_generate.sh] npm notice New minor version of npm available! 9.5.1 -> 9.6.6
      cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.6.6>
      cmderr	[automation_generate.sh] npm notice Run `npm install -g npm@9.6.6` to update!
      cmderr	[automation_generate.sh] npm notice
    • ️✔️azure-contoso-widgetmanager [View full logs]  [Release SDK Changes]
      info	[Changelog] data-plan skip changelog generation temporarily
    ️❌ azure-sdk-for-net-track2 failed [Detail]
    • Failed [Logs]Release - Generate from fb9c8e2. 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/contosowidgetmanager/data-plane/readme.md skipped due to azure-sdk-for-net-track2 not found in swagger-to-sdk
      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 generate sdk. exit code: False
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[0m
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1mGet-ChildItem: �[0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/automation/GenerateAndBuildLib.ps1:800
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1mLine |
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m 800 | �[0m … rtifacts += �[36;1mGet-ChildItem $artifactsPath -Filter *.nupkg -exclude *.s�[0m …
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m     | �[31;1m               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[36;1m     | �[31;1mCannot find path
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m     | �[31;1m'/mnt/vss/_work/1/s/azure-sdk-for-net/artifacts/packages/Debug/' because
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m     | �[31;1mit does not exist.
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[0m
      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 generate sdk artifact
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[0m
    • Azure.Contoso.WidgetManager [View full logs]  [Release SDK Changes]
      info	[Changelog]
    ️️✔️ azure-sdk-for-js succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from fb9c8e2. 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
      warn		specification/contosowidgetmanager/data-plane/readme.md skipped due to azure-sdk-for-js not found in swagger-to-sdk
      command	sh .scripts/automation_generate.sh ../azure-sdk-for-js_tmp/generateInput.json ../azure-sdk-for-js_tmp/generateOutput.json
    • ️✔️@azure-rest/contoso-widgetmanager-rest [View full logs]  [Release SDK Changes]
      info	[Changelog]
      error	breakingChangeTracking is enabled, but version or changelogItem is not found in output.
    ️⚠️ azure-sdk-for-java warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from fb9c8e2. 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
      warn		specification/contosowidgetmanager/data-plane/readme.md skipped due to azure-sdk-for-java not found in swagger-to-sdk
      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.6
      cmderr	[generate.py] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.6.6>
      cmderr	[generate.py] npm notice Run `npm install -g npm@9.6.6` to update!
      cmderr	[generate.py] npm notice
    • ️✔️azure-contoso-widgetmanager [View full logs]  [Release SDK Changes]
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented May 5, 2023

    Generated ApiView

    Language Package Name ApiView Link
    Python azure-contoso-widgetmanager https://apiview.dev/Assemblies/Review/3da22aa6e75946dca3424bf089862de5
    Java azure-contoso-widgetmanager Create ApiView failed. Please ask PR assignee for help
    JavaScript @azure-rest/contoso-widgetmanager-rest https://apiview.dev/Assemblies/Review/c0eb885c89d24d9281743ae7b091c5a3

    @AzureRestAPISpecReview AzureRestAPISpecReview added BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required CI-FixRequiredOnFailure data-plane labels May 5, 2023
    @openapi-workflow-bot
    Copy link

    Hi @mikeharder, Your PR has some issues. Please fix the CI sequentially by following the order of Avocado, semantic validation, model validation, breaking change, lintDiff. If you have any questions, please post your questions in this channel https://aka.ms/swaggersupport.

    TaskHow to fixPriority
    AvocadoFix-AvocadoHigh
    Semantic validationFix-SemanticValidation-ErrorHigh
    Model validationFix-ModelValidation-ErrorHigh
    LintDiffFix-LintDiffhigh
    If you need further help, please feedback via swagger feedback.

    @openapi-workflow-bot
    Copy link

    Hi @mikeharder, one or multiple breaking change(s) is detected in your PR. Please check out the breaking change(s), and provide business justification in the PR comment and @ PR assignee why you must have these change(s), and how external customer impact can be mitigated. Please ensure to follow breaking change policy to request breaking change review and approval before proceeding swagger PR review.
    Action: To initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
    If you want to know the production traffic statistic, please see ARM Traffic statistic.
    If you think it is false positive breaking change, please provide the reasons in the PR comment, report to Swagger Tooling Team via https://aka.ms/swaggerfeedback.
    Note: To avoid breaking change, you can refer to Shift Left Solution for detecting breaking change in early phase at your service code repository.

    @mikeharder
    Copy link
    Member Author

    @weshaggard: Do you know how the breaking change notifications should be handled, give this is only a sample?

    @JeffreyRichter
    Copy link
    Member

    Since it is just a sample, make all the breaking changes you wat - who cares?

    @mikeharder
    Copy link
    Member Author

    Since it is just a sample, make all the breaking changes you wat - who cares?

    Yes, I can override the branch protections and just merge, but I was wondering if there is a better process?

    @mikeharder
    Copy link
    Member Author

    Please check ModelValidation CI. You need to update the sample (of this sample) as well, e.g. https://github.com/Azure/azure-rest-api-specs/blob/6474e383d60b518fa1919ca65921ffcddf4dcb6e/specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview/examples/Widgets_ListWidgetsSample.json

    Should I update the examples in a text editor, or are these examples generated by a tool that I can re-run to re-generate the examples?

    @weshaggard: How did you generate the examples the first time?

    @weshaggard
    Copy link
    Member

    @weshaggard: How did you generate the examples the first time?

    I didn't create them originaly but at any rate yes we have to manually maintain those files.

    @mikeharder
    Copy link
    Member Author

    @weshaggard: How did you generate the examples the first time?

    I didn't create them originaly but at any rate yes we have to manually maintain those files.

    I manually updated the examples, but I noticed there are two copies of the examples under the following folders. Can one of these be deleted?

    • specification/contosowidgetmanager/Contoso.WidgetManager/examples/2022-11-01-preview
    • specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview

    @weshaggard
    Copy link
    Member

    It is my understanding the ones under the swagger directory get copied there as part of the tsp compile step that runs the autorest emitter.

    @weidongxu-microsoft
    Copy link
    Member

    I manually updated the examples, but I noticed there are two copies of the examples under the following folders. Can one of these be deleted?

    • specification/contosowidgetmanager/Contoso.WidgetManager/examples/2022-11-01-preview
    • specification/contosowidgetmanager/data-plane/Azure.Contoso.WidgetManager/preview/2022-11-01-preview

    Yeah, basically this examples-directory options tells typespec-autorest to read the example from typespec project and copy it to swagger folder.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required data-plane
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    6 participants