Skip to content

Conversation

@msyyc
Copy link
Member

@msyyc msyyc commented Feb 12, 2026

Fix

When re-generating a management plane SDK, the changelog generation pipeline inserts a new section at the top of CHANGELOG.md with a placeholder version. The version update step then replaces the first version line with the actual version, but the previous section with the same version number remains, creating duplicate content.

Fixes: Azure/azure-sdk-tools#12425

When re-generating an SDK, the changelog generation pipeline inserts a new
section at the top of CHANGELOG.md. The version update step then updates the
first version line, but the previous section with the same version remains,
creating duplicate content.

This fix detects if the next version section after the updated one has the
same version number. If so, it removes that duplicate section entirely,
keeping only the newly generated one.

Fixes: Azure/azure-sdk-tools#12425
@msyyc msyyc requested review from mccoyp and scbedd as code owners February 12, 2026 09:29
Copilot AI review requested due to automatic review settings February 12, 2026 09:29
@msyyc msyyc changed the title Fix changelog duplication when re-generating management plane SDK [sdk generation pipeline] Fix changelog duplication when re-generating management plane SDK Feb 12, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a changelog-generation edge case in the management-plane SDK regeneration workflow where updating the top version header can leave a duplicated version section behind.

Changes:

  • Add logic in sdk_update_version.py to detect and remove a duplicate “next” version section after updating the first version header.
  • Add tests intended to validate duplicate-section removal and ensure non-duplicate sections remain.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
eng/tools/azure-sdk-tools/packaging_tools/sdk_update_version.py Updates changelog version header and attempts to delete an immediately-following duplicate version section.
eng/tools/azure-sdk-tools/tests/test_sdk_update_version.py Adds test cases for duplicate-version section removal behavior.

@msyyc
Copy link
Member Author

msyyc commented Feb 13, 2026

/check-enforcer override

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.

[Python] Changelog generation in management plane includes duplicate information when re-generating SDK

2 participants