Repository navigation
Suppress redundant [Stage] diff line for added/removed types in API diff comment - #38444
Merged
Merged
Conversation
Co-authored-by: AndriySvyryd <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates ApiChief’s delta-model generation so the markdown API diff no longer emits a redundant + [Stage] Experimental / - [Stage] Experimental line for newly added or removed experimental types, since the type header already carries the [Experimental] tag. Stage diff lines are intended to appear only when an existing type’s stage changes between baseline and current.
Changes:
- In
ApiModel.CreateTypeDelta, computeaddedStage/removedStageonly when the stage actually changed between baseline/current (both present and differing). - As a result,
EmitDelta.AppendStageDiffLinewill no longer print a[Stage] ...line for added/removed types whose stage isn’t changing (only their presence is).
Co-authored-by: AndriySvyryd <[email protected]>
AndriySvyryd
marked this pull request as ready for review
June 17, 2026 21:38
AndriySvyryd
enabled auto-merge (squash)
June 17, 2026 21:38
wtgodbe
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The API diff comment emits a redundant
+ [Stage] Experimentalline when a new experimental type is introduced — the type header already carries the[Experimental]tag (e.g.+ [Experimental] MyType). The stage line is only meaningful when the stage of a pre-existing type changes.Changes
ApiModel.CreateTypeDelta, gateaddedStage/removedStageonstageChanged(bothcurrentTypeandbaselineTypepresent with differing stages) instead of also firing when one side isnull. Added/removed types fall through toStable, soAppendStageDiffLineno longer emits a line for them.Resulting output
Stage-change diffs on existing types are unaffected: