Skip to content

Support RLC Changelog Generation Based on Inline Usage#8751

Merged
wanlwanl merged 40 commits intoAzure:mainfrom
wanlwanl:wanl/support-changelog-in-rlc
Aug 19, 2024
Merged

Support RLC Changelog Generation Based on Inline Usage#8751
wanlwanl merged 40 commits intoAzure:mainfrom
wanlwanl:wanl/support-changelog-in-rlc

Conversation

@wanlwanl
Copy link
Copy Markdown
Contributor

@wanlwanl wanlwanl commented Aug 1, 2024

Feature

  • Support Breaking Change Detection in RLC: #8301 for inline usage

Solution

  1. Scan the AST to get all the inline types that we don't care in next generation of breaking change detection tool
  2. Add an post processor to remove all lines about inlinte types in changelog in current tool (so that we can add new features in the next breaking change detection tool and integrate with current tool seamlessly)

Algorithm

Get All Inline Types in Old and New Packages

  • Find TypeReference's in Routes and get all renamable types: interfaces/type aliases/enums recursively: src

Post Processor to Current Changelog Generation

  • Add addtional marks to founded changes.
  • Detect if it's belong to type rename
  • If it's type rename, remove from changelog

Result

Use arm-servicefabric.api.md as test case

Note that the test cover the type rename of the followings:

  • Operation group (ClustersGet --> ClustersGet_DDD)
  • Response type (ClustersDelete200Response --> ClustersDelete200ResponseAAA)
  • Parameter type (ClustersUpdateMediaTypesParam --> ClustersUpdateMediaTypesParam_CCC, ClusterUpdateParameters --> ClusterUpdateParameters_BBB)
  • Core type (ClusterVersionsGetParameters --> ClusterVersionsGetParameters_EEE)
  • Nested type in the parameters (DiagnosticsStorageAccountConfig --> DiagnosticsStorageAccountConfig_HHH)
    All of them are ignored as expected

Also note that other breaking changes are not impacted:

  • Parameter name is renamed (protectedAccountKeyName --> protectedAccountKeyName_GGG)
  • parameter name is renamed (queueEndpoint --> queueEndpoint_III) while Interface name is renamed (DiagnosticsStorageAccountConfigOutput --> DiagnosticsStorageAccountConfigOutput_FFF)

Note that the green bar seperate before/after post process

Before Post Process

image

After Post Process

image

Next

  1. Enable in RLC SDK generation

@wanlwanl wanlwanl changed the title Support RLC Changelog Generation Based on Inline Usage [WIP] Support RLC Changelog Generation Based on Inline Usage Aug 1, 2024
@wanlwanl wanlwanl changed the title [WIP] Support RLC Changelog Generation Based on Inline Usage Support RLC Changelog Generation Based on Inline Usage Aug 2, 2024
Comment thread tools/js-sdk-release-tools/src/changelog/changelogGenerator.ts Outdated
Comment thread tools/js-sdk-release-tools/package.json Outdated
Comment thread tools/js-sdk-release-tools/src/changelog/changelogGenerator.ts Outdated
Comment thread tools/js-sdk-release-tools/package.json
Comment thread tools/js-sdk-release-tools/src/mlc/apiVersion/apiVersionTypeExtractor.ts Outdated
Comment thread tools/js-sdk-release-tools/src/changelog/changelogGenerator.ts Outdated
Comment thread tools/js-sdk-release-tools/package.json Outdated
Comment thread tools/js-sdk-release-tools/ci.yml Outdated
@wanlwanl wanlwanl requested a review from a team as a code owner August 14, 2024 06:03
@wanlwanl wanlwanl enabled auto-merge (squash) August 19, 2024 09:11
Change test case to the same with pr

Mix merge conflict... TT

Fix CI

Add recursive test

Fix install rollup failure in ci bug

Try optional dep for CI issue

Add all supported platform

Change tmp folder

Update to support latest emitter

Update test

Update

Update
@wanlwanl wanlwanl force-pushed the wanl/support-changelog-in-rlc branch from 8159e94 to e09ac84 Compare August 19, 2024 13:07
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.

3 participants