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

Support SDK generation outside Azure/azure-sdk-for-net #38143

Closed
heaths opened this issue Aug 10, 2023 · 4 comments
Closed

Support SDK generation outside Azure/azure-sdk-for-net #38143

heaths opened this issue Aug 10, 2023 · 4 comments
Labels
Azure.Core.TestFramework Azure.Core Client This issue points to a problem in the data-plane of the library. EngSys This issue is impacting the engineering system. needs-author-feedback Workflow: More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue.
Milestone

Comments

@heaths
Copy link
Member

heaths commented Aug 10, 2023

With goals of becoming more of a toolset, we need to support building - but not necessarily shipping; we'll still be the authoritative, official source of client libraries - SDKs outside our repo. This is related to our efforts with code generation atop TypeSpec, both for generating server source as well as client source - the latter of which would be used for testing the service and giving the service team an early preview of what using their SDK would look like so they can make adjustments to their TypeSpecs as needed.

Currently, I can think of the following issue(s) that prevent us from supporting this:

  • Shared source: we have a lot of shared source that we link into our SDKs, and paths are found relative to our repo layout. Alternatively, we could consider:
    • Put it in an obvious namespace like "Azure.Internal" or something (ASP.NET does something similar) but make the types public. This is also a common approach in most other track 2 languages.
    • Publish a separate "source package" kin to Azure.Core but containing only shared source. IIRC, we did (or still do) something like this with autorest.csharp.
  • Azure.Core.TestFramework relies on <ProjectReference> but we could publish this and use a <PackageReference> instead. License and description could specify it's only in support of developer Azure SDKs, or perhaps we publish it to an internal feed if we're not ready to completely open it up.
@heaths heaths added Client This issue points to a problem in the data-plane of the library. EngSys This issue is impacting the engineering system. Azure.Core Azure.Core.TestFramework labels Aug 10, 2023
@heaths
Copy link
Member Author

heaths commented Aug 12, 2023

We discussed this in our team sync yesterday, and it turns out we already have something in place. I think it's a good start to unblock internal partners but, long-term, we'll need to consider other options to make this accessible to the public e.g., outside contributors or third-party partners.

Available now

  • If the namespace in tspconfig.yaml starts with "Azure." the right template is chosen to pull in shared source as we would within the repo today. This lacks many - if not all - of the analyzers we'd run in our repo, however, but should produce an SDK that is the same or very similar to what we'd ship from our repo when the time came.
  • There are allegedly some scripts or tasks that will make a shallow clone of our repo, generate the necessary project files and source, and build an SDK as if it were done in our repo from the start. These may be the same tasks that we use in the Azure/azure-rest-api-specs repo. Need to investigate further.

Long-term

  • We could create a "lite" assembly of build files that we have in our repo now - ideally, we'd use those in our build for qualify control and consistency - and could package those up and publish the package to our public Azure Artifacts feed, which we already point to in our root nuget.config file. This could run the appropriate analyzers, build validations, etc., and potentially enforce the same package dependency we have now in eng/Packages.Data.props.

@annelo-msft
Copy link
Member

I believe since OpenAI is generating clients outside the repo, we may have addressed this feature request. @heaths can you confirm whether this is still needed?

@annelo-msft annelo-msft added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Oct 16, 2024
Copy link

Hi @heaths. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

Copy link

Hi @heaths, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label Oct 23, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core.TestFramework Azure.Core Client This issue points to a problem in the data-plane of the library. EngSys This issue is impacting the engineering system. needs-author-feedback Workflow: More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue.
Projects
None yet
Development

No branches or pull requests

2 participants