Repository navigation
Description
Is your feature request related to a problem? Please describe.
Python SDK generation can cause a spec PR to receive BreakingChange-Python-Sdk even when the affected SDK has never had a generally available (GA) release. This adds breaking-change review and approval work before the SDK has a stable public contract.
Example: Azure/azure-rest-api-specs#46860, [Commvault] Add 2026-09-30 stable API. The PR promotes a preview API contract to its first stable API version. It currently has both BreakingChange-Python-Sdk and BreakingChange-Python-Sdk-Approved labels.
In the discussion that prompted this issue:
- Python's behavior was explained as reporting breaking changes whenever the generated changelog contains breaking changes, regardless of whether the SDK has reached GA.
- The Go owners confirmed that Go does not report SDK breaking changes in the spec repo for SDKs that have not reached GA.
- Aligning Python with Go was supported to reduce unnecessary review work.
The Go behavior above is reported from that discussion; it has not been independently checked as part of filing this issue. Other language behavior remains unconfirmed.
Describe the solution you'd like
Update Python's spec-PR SDK generation/reporting so that compatibility differences against preview-only releases do not trigger the Python SDK breaking-change label or its associated approval requirement when the package has no prior published GA release. Include the transition from preview to the first GA release.
Use the SDK package's published release history to determine whether it has reached GA. A stable service API version or a stable target SDK release alone does not establish that a prior GA SDK exists.
Keep useful API-difference/changelog information available to service teams. Preserve existing breaking-change detection and review requirements for packages with a prior published GA release. This request concerns SDK compatibility reporting, not service API breaking-change policy.
Implementation investigation:
- Review and update
eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.pyas needed. It invokessdk_changelog_generate(...), passes the per-package result, and writes that result to the generation output. ItstagIsStablefield describes the target release, not whether the package previously reached GA. - Review the shared reporting logic in
eng/tools/azure-sdk-tools/packaging_tools/sdk_changelog.py. It currently setspackage_result["changelog"]["hasBreakingChange"]from"Breaking Changes" in md_output, without a prior-GA check at that assignment. It also exposes a separate JSON change-detector output; check whether that path feeds spec-PR labeling and keep relevant reporting paths consistent. - Trace the downstream label consumer before deciding where to apply the eligibility check. Do not remove changelog entries solely to avoid a label.
Acceptance criteria:
- Preview-only package, preview-to-preview change: API differences do not trigger
BreakingChange-Python-Sdkor require SDK breaking-change approval. - Preview-only package, preview-to-first-GA change: the same suppression applies, even when the target API/SDK release is stable.
- New package with no published releases: no spurious SDK breaking-change label.
- Package with a prior published GA release: existing applicable breaking-change reporting and approval behavior remains unchanged.
- Non-breaking changes remain non-breaking; changelog/API-difference details are preserved.
- Add focused regression tests for the release-history decision and the generation/reporting output used by spec-PR labeling. Do not treat a release-history lookup failure as proof that no GA release exists.
Describe alternatives you've considered
- Continue manually approving pre-GA breaking-change labels. This retains unnecessary review work and differs from the confirmed Go policy.
- Gate only on the target API or SDK being preview. This misses the preview-to-first-GA case that prompted the request.
- Remove breaking-change details from changelogs. This would discard useful information; prefer separating review eligibility from API-difference documentation.
Additional context
- Motivating PR: [Commvault] Add 2026-09-30 stable API Azure/azure-rest-api-specs#46860
- Generation entry point: https://github.com/Azure/azure-sdk-for-python/blob/main/eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py
- Changelog/reporting implementation: https://github.com/Azure/azure-sdk-for-python/blob/main/eng/tools/azure-sdk-tools/packaging_tools/sdk_changelog.py
This issue tracks the Python engineering-system change. No SDK source changes are included in this request.
Originally posted by @msyyc in Azure/azure-sdk-for-python#49530
Activity
45tyx4spwt-sketch commentedon Oct 27, 2026
Bmill95 6heures 16