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

Mark operations protocolAPI(false) for text translation #23681

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

pshao25
Copy link
Member

@pshao25 pshao25 commented Apr 23, 2023

Looks like text translation wants to make these operations internal.

@openapi-workflow-bot
Copy link

Hi, @pshao25 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 Apr 23, 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, 1 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."
    ️️✔️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 Apr 23, 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]
    • Pipeline Framework Failed [Logs] Generate from 249d253136583a20140f19887b6675563010747c. 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;1mWrite-Error: �[0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/common/scripts/TypeSpec-Project-Process.ps1:26
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1mLine |
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m  26 | �[0m   $serviceDir = �[36;1mGet-ServiceDir $tspConfig $repoRoot�[0m
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m     | �[31;1m                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[36;1m     | �[31;1mMissing service-dir in parameters section of tspconfig.yaml. Please
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m     | �[31;1mrefer to
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m     | �[31;1mhttps://github.com/Azure/azure-rest-api-specs/blob/main/specification/contosowidgetmanager/Contoso.WidgetManager/tspconfig.yaml for the right schema.
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[0m
      warn	No file changes detected after generation
      the given reference name 'refs/heads/sdkAuto/23681/' is not valid
      Error: the given reference name 'refs/heads/sdkAuto/23681/' is not valid
    • error	Fatal error: the given reference name 'refs/heads/sdkAuto/23681/' is not valid
      error	The following packages are still pending:
      error
    ️❌ azure-sdk-for-python failed [Detail]
    • Code Generator Failed [Logs] Generate from 249d253136583a20140f19887b6675563010747c. 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.1 -> 9.7.2
      cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.7.2>
      cmderr	[automation_generate.sh] npm notice Run `npm install -g [email protected]` to update!
      cmderr	[automation_generate.sh] npm notice
      cmdout	[automation_generate.sh] [Autorest]/mnt/vss/_work/1/s/azure-sdk-for-python_tmp/venv-sdk/auto_temp.json does not exist!!!Error happened during codegen
      error	Script return with result [failed] code [1] signal [null] cwd [azure-sdk-for-python]: sh scripts/automation_generate.sh
      warn	Skip package processing as generation is failed
    ️❌ azure-sdk-for-java failed [Detail]
    • Pipeline Framework Failed [Logs] Generate from 249d253136583a20140f19887b6675563010747c. 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] �[31;1mGet-ServiceDir: �[0m/mnt/vss/_work/1/s/azure-sdk-for-java/eng/common/scripts/TypeSpec-Project-Process.ps1:26
      cmderr	[generate.py] �[36;1mLine |
      cmderr	[generate.py] �[36;1m  26 | �[0m   $serviceDir = �[36;1mGet-ServiceDir $tspConfig $repoRoot�[0m
      cmderr	[generate.py] �[36;1m     | �[31;1m                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cmderr	[generate.py] �[31;1m�[36;1m     | �[31;1mMissing service-dir in parameters section of tspconfig.yaml. Please
      cmderr	[generate.py] �[36;1m     | �[31;1mrefer to
      cmderr	[generate.py] �[36;1m     | �[31;1mhttps://github.com/Azure/azure-rest-api-specs/blob/main/specification/contosowidgetmanager/Contoso.WidgetManager/tspconfig.yaml for the right schema.
      cmderr	[generate.py] �[0m
      error	Fatal error: The "path" argument must be of type string. Received undefined
      The "path" argument must be of type string. Received undefined
      TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
          at new NodeError (node:internal/errors:387:5)
          at validateString (node:internal/validators:162:11)
          at Object.basename (node:path:1309:5)
          at Object.exports.getPackageData (/mnt/vss/_work/1/a/unified-pipeline-runtime/private/openapi-sdk-automation/lib/types/PackageData.js:38:82)
          at /mnt/vss/_work/1/a/unified-pipeline-runtime/private/openapi-sdk-automation/lib/automation/workflow.js:210:194
          at Array.map (<anonymous>)
          at workflowHandleReadmeMdOrTypeSpecProject (/mnt/vss/_work/1/a/unified-pipeline-runtime/private/openapi-sdk-automation/lib/automation/workflow.js:210:164)
          at processTicksAndRejections (node:internal/process/task_queues:96:5)
          at async Object.exports.workflowMain (/mnt/vss/_work/1/a/unified-pipeline-runtime/private/openapi-sdk-automation/lib/automation/workflow.js:98:13)
          at async Object.exports.sdkAutoMain (/mnt/vss/_work/1/a/unified-pipeline-runtime/private/openapi-sdk-automation/lib/automation/entrypoint.js:191:13)
          at async /mnt/vss/_work/1/a/unified-pipeline-runtime/private/openapi-sdk-automation/lib/cli/cli.js:20:18
    ️🔄 azure-sdk-for-js inProgress [Detail]
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Apr 23, 2023

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

    @weidongxu-microsoft
    Copy link
    Member

    Shouldn't internal be @internal decorator?

    If one does not want to expose the API but you cannot use @internal, at least also set @convenientAPI to false.

    @lirenhe lirenhe requested review from mikekistler and lmazuel April 23, 2023 08:01
    @pshao25
    Copy link
    Member Author

    pshao25 commented Apr 23, 2023

    Shouldn't internal be @internal decorator?

    If one does not want to expose the API but you cannot use @internal, at least also set @convenientAPI to false.

    Yes, this might be a real case for @internal. Looks like text translation wants to make both protocol method and convenience method internal, and they have customiztion on top of the internal convenience method. @MikeyMCZ correct me if I'm wrong.

    Added tcgc library reference to global package.json
    package.json Outdated
    @@ -8,6 +8,7 @@
    "@azure-tools/typespec-autorest": "0.29.0",
    "@azure-tools/typespec-azure-core": "0.29.0",
    "@azure-tools/typespec-azure-resource-manager": "0.29.0",
    "@azure-tools/typespec-client-generator-core": "0.29.0",
    Copy link
    Member

    Choose a reason for hiding this comment

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

    @raych1 you also need to update the lock file with this change.

    @weshaggard
    Copy link
    Member

    @pshao25 you also need to compile and update the swagger files.

    @ghost
    Copy link

    ghost commented May 14, 2023

    Hi, @pshao25. Your PR has no update for 14 days and it is marked as stale PR. If no further update for over 14 days, the bot will close the PR. If you want to refresh the PR, please remove no-recent-activity label.

    @ghost ghost added the no-recent-activity label May 14, 2023
    @ghost ghost closed this May 29, 2023
    @ghost
    Copy link

    ghost commented May 29, 2023

    Hi, @pshao25. The PR will be closed since the PR has no update for 28 days. If you still need the PR review to proceed, please reopen it and @ mention PR assignee.

    @pshao25 pshao25 reopened this Jun 30, 2023
    @ghost ghost removed the no-recent-activity label Jun 30, 2023
    @pshao25 pshao25 marked this pull request as draft June 30, 2023 03:24
    @pshao25
    Copy link
    Member Author

    pshao25 commented Jun 30, 2023

    Blocked by Azure/autorest.csharp#3519

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

    Successfully merging this pull request may close these issues.

    5 participants