Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 28, 2025

Plan to address issue: Invoke-TypeSepcDataPlaneGenerateSDKPackage.ps1 is not using new emitter path

Based on the issue discussion and team decision:

  • Explore the repository and understand the issue
  • Delete the obsolete script eng/scripts/automation/Invoke-TypeSpecDataPlaneGenerateSDKPackage.ps1
  • Update documentation in doc/DataPlaneCodeGeneration/AzureSDKPackage_Setup.md to recommend using tsp-client init or manual creation of tsp-location.yaml
  • Search for and remove any other references to the deleted script
  • Verify changes and commit
  • Delete redundant AzureSDKPackage_Setup.md file per PR feedback
  • Update reference in AzureSDKGeneration_Prerequistites.md
  • Remove circular link from prerequisites doc
  • Add link to Azure.Template in prerequisites doc
  • Update Azure.Template to use TypeSpec (remove autorest.md, add tsp-location.yaml)
  • Remove IncludeAutorestDependency from Azure.Template csproj
  • Delete swagger folder from Azure.Template
  • Update tsp-location.yaml to reference widget example
  • Reference azure-rest-api-specs PR 38490 for commit hash
Original prompt

This section details on the original issue you should resolve

<issue_title>Invoke-TypeSepcDataPlaneGenerateSDKPackage.ps1 is not using new emitter path</issue_title>
<issue_description>tsp-client init was updated to automatically use the new emitter path for new services. We need to investigate why this script is not doing that.</issue_description>

Comments on the Issue (you are @copilot in this section)

@jsquire Do we even need this script? There seem to be so many scripts like this floating around and I'm not sure where many are used. @JoshLove-msft @raych1 do you have context as to where this script is used? If it is not needed for the pipeline automation, agreed we can probably remove it and any references to it. @JoshLove-msft Here is where it is referenced https://github.com/Azure/azure-sdk-for-net/blob/9b64c749219efbaafc48a578fba59c2f8a60fecc/doc/DataPlaneCodeGeneration/AzureSDKPackage_Setup.md. I don't know if we are at the point yet where the REST spec pipeline automation can fully replace this script which sets up the scaffolding for a brand new service library. That said, it doesn't do much more than tsp-client init, so maybe we can just recommend that instead. @raych1 This script isn't used by the REST spec pipeline automation. I agreed that it could be replaced by calling `tsp-client init` directly. @JoshLove-msft We will update the docs to recommend either using `tsp-client init` or just manually create the tsp-location.yaml and will delete this script.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

… and update documentation

- Deleted eng/scripts/automation/Invoke-TypeSpecDataPlaneGenerateSDKPackage.ps1 as it is not using the new emitter path
- Updated doc/DataPlaneCodeGeneration/AzureSDKPackage_Setup.md to recommend using tsp-client init or manually creating tsp-location.yaml
- Added guidance on required emitterPackageJsonPath property for new services

Co-authored-by: JoshLove-msft <[email protected]>
Copilot AI changed the title [WIP] Fix Invoke-TypeSpecDataPlaneGenerateSDKPackage.ps1 emitter path issue Remove obsolete Invoke-TypeSpecDataPlaneGenerateSDKPackage.ps1 and update setup docs Oct 28, 2025
Copilot finished work on behalf of JoshLove-msft October 28, 2025 21:45
Copilot AI requested a review from JoshLove-msft October 28, 2025 21:45
We will use the Azure SDK template [Azure.Template](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/template/Azure.Template) to create the initial project skeleton for SDKs generated from TypeSpec.

You can run `eng\scripts\automation\Invoke-TypeSpecDataPlaneGenerateSDKPackage.ps1` to generate the starting SDK client library package directly as following:
### Option 1: Using tsp-client init (Recommended)
Copy link
Member

Choose a reason for hiding this comment

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

@copilot let's just delete this file. We already have a separate doc that provides the same info.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Deleted AzureSDKPackage_Setup.md and updated the reference in AzureSDKGeneration_Prerequistites.md to point to AzureSDKCodeGeneration_DataPlane_Quickstart.md instead (commit 869fba0).

- Deleted doc/DataPlaneCodeGeneration/AzureSDKPackage_Setup.md as requested - content is covered in AzureSDKCodeGeneration_DataPlane_Quickstart.md
- Updated reference in AzureSDKGeneration_Prerequistites.md to point to the quickstart guide instead

Co-authored-by: JoshLove-msft <[email protected]>
Copilot AI changed the title Remove obsolete Invoke-TypeSpecDataPlaneGenerateSDKPackage.ps1 and update setup docs Remove obsolete Invoke-TypeSpecDataPlaneGenerateSDKPackage.ps1 script and clean up docs Oct 28, 2025
Copilot AI requested a review from JoshLove-msft October 28, 2025 22:02
Copilot finished work on behalf of JoshLove-msft October 28, 2025 22:02
## Set up SDK Project Folder

You will need to generate the SDK library under an SDK project folder following the repository [guidelines](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/DataPlaneCodeGeneration/AzureSDKPackage_Setup.md).
You will need to generate the SDK library under an SDK project folder following the repository [guidelines](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/DataPlaneCodeGeneration/AzureSDKCodeGeneration_DataPlane_Quickstart.md).
Copy link
Member

Choose a reason for hiding this comment

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

@copilot we should just remove this link as it is linking back to the same document where this md is hosted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Removed the circular link from the prerequisites doc (commit 4415299).

- Removed link from AzureSDKGeneration_Prerequistites.md that was linking back to AzureSDKCodeGeneration_DataPlane_Quickstart.md
- The quickstart already references the prerequisites, so this created a circular reference

Co-authored-by: JoshLove-msft <[email protected]>
Copilot AI requested a review from JoshLove-msft October 28, 2025 22:51
Copilot finished work on behalf of JoshLove-msft October 28, 2025 22:51
## Set up SDK Project Folder

You will need to generate the SDK library under an SDK project folder following the repository [guidelines](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/DataPlaneCodeGeneration/AzureSDKPackage_Setup.md).
You will need to generate the SDK library under an SDK project folder following the repository guidelines.
Copy link
Member

Choose a reason for hiding this comment

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

@copilot lets link to the template as an example. https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/template/Azure.Template.

Let's also update the template to remove autorest.md and instead add a tsp-location.yaml.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Updated prerequisites doc to link to Azure.Template as an example. Also updated the template itself: removed autorest.md and added tsp-location.yaml with placeholder values (commit 088d0d6).

Copy link
Member

@JoshLove-msft JoshLove-msft Oct 28, 2025

Choose a reason for hiding this comment

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

@copilot let's also remove <IncludeAutorestDependency>true</IncludeAutorestDependency> from the csproj

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The comment appears incomplete. Should I remove <IncludeAutorestDependency>true</IncludeAutorestDependency> from the Azure.Template.csproj since we replaced autorest.md with tsp-location.yaml?

Copy link
Member

Choose a reason for hiding this comment

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

@copilot yes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Removed IncludeAutorestDependency from Azure.Template.csproj (commit 136ee56).

Copy link
Member

Choose a reason for hiding this comment

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

@copilot let's also delete the local swagger folder in this project.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Deleted the swagger folder from Azure.Template (commit bcf2541).

- Added link to Azure.Template in AzureSDKGeneration_Prerequistites.md as an example
- Removed autorest.md from Azure.Template (obsolete for TypeSpec)
- Added tsp-location.yaml to Azure.Template with placeholder values as a template for new services

Co-authored-by: JoshLove-msft <[email protected]>
Copilot AI changed the title Remove obsolete Invoke-TypeSpecDataPlaneGenerateSDKPackage.ps1 script and clean up docs Remove obsolete Invoke-TypeSpecDataPlaneGenerateSDKPackage.ps1 script and modernize template for TypeSpec Oct 28, 2025
Copilot AI requested a review from JoshLove-msft October 28, 2025 23:15
Copilot finished work on behalf of JoshLove-msft October 28, 2025 23:15
Copilot finished work on behalf of JoshLove-msft October 28, 2025 23:18
- Removed IncludeAutorestDependency property since template now uses TypeSpec with tsp-location.yaml instead of autorest.md

Co-authored-by: JoshLove-msft <[email protected]>
Copilot finished work on behalf of JoshLove-msft October 28, 2025 23:23
- Removed sdk/template/Azure.Template/src/swagger folder as it's no longer needed for TypeSpec-based generation

Co-authored-by: JoshLove-msft <[email protected]>
Copilot finished work on behalf of JoshLove-msft October 28, 2025 23:27
# This is a template tsp-location.yaml file for TypeSpec-based SDK generation
# Replace the placeholder values with your actual TypeSpec project information

directory: specification/<service-name>/<typespec-project-folder>
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Updated the directory to point to specification/widget/data-plane/WidgetAnalytics (commit de01e0c).

- Updated directory to point to specification/widget/data-plane/WidgetAnalytics as a concrete example instead of placeholder values

Co-authored-by: JoshLove-msft <[email protected]>
Copilot AI requested a review from JoshLove-msft October 29, 2025 00:06
Copilot finished work on behalf of JoshLove-msft October 29, 2025 00:06
# Replace the placeholder values with your actual TypeSpec project information

directory: specification/widget/data-plane/WidgetAnalytics
commit: <commit-hash-from-azure-rest-api-specs>
Copy link
Member

Choose a reason for hiding this comment

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

Update to new commit once #53550 is resolved

Copy link
Member

Choose a reason for hiding this comment

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

@copilot update to use the spec from here Azure/azure-rest-api-specs#38490

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added reference to PR 38490 with a TODO comment to update the commit hash once the PR is merged (commit 8b7371e).

- Added TODO comment to update commit once PR 38490 is merged
- Updated placeholder commit reference to indicate it should come from PR 38490

Co-authored-by: JoshLove-msft <[email protected]>
Copy link
Contributor Author

Copilot AI commented Nov 5, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/Azure/azure-rest-api-specs/pulls/38490
    • Triggering command: curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from JoshLove-msft November 5, 2025 17:12
Copilot finished work on behalf of JoshLove-msft November 5, 2025 17:13
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.

Invoke-TypeSepcDataPlaneGenerateSDKPackage.ps1 is not using new emitter path

2 participants