Skip to content

[Python] Model-only TypeSpec project rejected by no-sdk-clients #11794

Closed

Description

@Nishanth-MS

Problem

Azure/azure-rest-api-specs#44723 changes only Go-scoped client names in:

specification/eventgrid/data-plane/EventGridSystemEvents/propertyNameOverrideGo.tsp

Go SDK validation succeeds, but Python SDK validation fails with:

@typespec/http-client-python/no-sdk-clients:
The Python emitter did not find any SDK clients in this TypeSpec program.

Failed spec PR: Azure/azure-rest-api-specs#44723

Failed Python validation: https://dev.azure.com/azure-sdk/29ec6040-b234-4e31-b139-33dc4287b756/_build/results?buildId=6672449

Project shape

EventGridSystemEvents is intentionally a model-only system-events catalog. It defines an @service namespace and event models but no HTTP operations or SDK client interfaces.

Its Python output contributes models to sdk/eventgrid/azure-eventgrid.

Regression boundary

Generation succeeds with:

  • @azure-tools/typespec-python 0.61.3
  • @typespec/http-client-python 0.28.3
  • typespec-client-generator-cli 0.32.1

Generation fails with:

  • @azure-tools/typespec-python 0.63.3
  • @typespec/http-client-python 0.35.1
  • typespec-client-generator-cli 0.33.1

The old, previously successful specification also fails under the newer toolchain, so this is independent of the Go changes in PR #44723.

The rejecting check appears to have been added by #10203, commit 755fe9a0974439e8c14abc0c2ddf0302e70d9e25.

Previously, model-only packages were explicitly re-enabled by #7348.

Requested resolution

Please restore Python generation support for model-only TypeSpec packages, or provide an approved mechanism for model-only projects to avoid the no-sdk-clients diagnostic.

This currently blocks an otherwise Go-only Azure SDK specification PR.

/cc iscai-msft Yuchao Yan (@msyyc) Chenjie Shi (@tadelesh)

Activity

  1. github-actions commented on Aug 31, 2026

    @github-actions
    Contributor

    🎯 Issue Triage

    The no-sdk-clients diagnostic introduced in #10203 now rejects model-only TypeSpec packages (e.g., EventGridSystemEvents) that previously worked fine, breaking Python SDK generation for specs that intentionally have no HTTP operations.

    Category: Bug

    Area: emitter:client:python

    ⚠️ No reproduction provided. A minimal repro would help diagnose this issue.

    🔍 Analysis
    📝 Suggested next steps
    • Review the no-sdk-clients rule introduced in Enable Python Emitter in TypeSpec Playground #10203 to understand if model-only packages should be exempt.
    • Consider adding an opt-out mechanism (e.g., an emitter option or decorator) for packages that are intentionally model-only.
    • Reference the prior fix in [python] reallow models only package #7348 for context on how model-only packages were previously supported.
    • CC'd engineers (@iscai-msft, @msyyc, @tadelesh) should evaluate whether the rule should be relaxed or made suppressible.

    Generated by Agentic Triage

  2. msyyc commented on Aug 31, 2026

    @msyyc
    Contributor

    It seems be regression caused by #10203 but not sure whether the regression is intended.
    jenny (@JennyPng) Could you provide more context about https://github.com/microsoft/typespec/pull/10203/changes#r3892620265?
    CC iscai-msft

  3. JennyPng commented on Aug 31, 2026

    @JennyPng
    Member

    Yuchao Yan (@msyyc) That was added because TypeSpec would fail to compile in the playground without an SDK client, so it provided a clearer error message to users. If it's a regression I can revert the part, the scope of that PR was just enabling Python SDK generation in the playground

  4. msyyc commented on Sep 2, 2026

    @msyyc
    Contributor

    Will fix the issue in #11823

  5. lirenhe commented on Sep 17, 2026

    @lirenhe
    Member

    Close it as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workingemitter:client:pythonIssue for the Python client emitter: @typespec/http-client-python

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions