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 RLC Changelog Generation Based on Inline Usage #8751

Merged
merged 40 commits into from
Aug 19, 2024

Conversation

wanlwanl
Copy link
Member

@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
@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
@wanlwanl wanlwanl force-pushed the wanl/support-changelog-in-rlc branch from fa8196f to a622d02 Compare August 19, 2024 13:15
@wanlwanl wanlwanl merged commit a37817c into Azure:main Aug 19, 2024
7 checks passed
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