ci: add DOM-surface regression integration test#7859
Open
gavinbarron wants to merge 1 commit into
Open
Conversation
Adds an integration test that diffs the kiota public API (DOM) export produced by the published Microsoft.OpenApi.Kiota NuGet tool against the export produced by the current changeset, failing on removals to catch binary/source breaking changes in downstream SDKs. - it/generate-dom-export.ps1: emit kiota-dom-export.txt for one generator/language/spec - it/compare-dom-export.ps1: build baseline + current exports and a format-patch - .github/workflows/surface-area-tests.yml: csharp/java x Graph beta matrix, feeds the patch to microsoftgraph/kiota-dom-export-diff-tool/tool with fail-on-removal Closes #7858 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Code Coverage OverviewLanguages: C# C# / code-coverage/dotnetThe overall coverage in the branch is 71%. Coverage data for the branch is not yet available. Show a code coverage summary of the most covered files.
Code Coverage is in Public Preview. Learn more and provide us with your feedback. |
baywet
reviewed
Jun 26, 2026
| - csharp | ||
| - java | ||
| description: | ||
| - "https://github.com/microsoftgraph/msgraph-metadata/raw/refs/heads/master/openapi/beta/openapi.yaml" |
Member
There was a problem hiding this comment.
The problem you'll have with beta is that API version allows breaking changes.
So from one week to another, you'll get noise not because of a Kiota regression, but because of the source.
I recommend to use v1 instead
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.
Description
Adds a DOM-surface regression integration test to catch binary/source breaking changes that a change to kiota''s generation logic could introduce into downstream SDKs (notably the Microsoft Graph SDKs), mirroring the surface-area validation the Graph SDK repos already run on spec changes.
How it works
Per language, the new workflow:
kiota-dom-export.txt) using the publishedMicrosoft.OpenApi.KiotaNuGet tool.git format-patchstyle patch between the two.microsoftgraph/kiota-dom-export-diff-tool/toolwithfail-on-removal: true(pinned to a commit SHA); on PRs it posts the explanations as a comment.No generator code change is required — the export is enabled via the existing
Generation:ExportPublicApiflag (env varKIOTA_Generation__ExportPublicApi=true).Files
it/generate-dom-export.ps1— emit the DOM export for one generator/language/spec.it/compare-dom-export.ps1— install the baseline tool, build baseline + current exports, emit the patch..github/workflows/surface-area-tests.yml—csharp+java× Graph beta matrix, analyze + comment + artifacts + branch-policy aggregator.it/Readme.md,CHANGELOG.md— docs.Initial scope
csharpandjavaagainst Graph beta, designed to expand to more languages/specs later.Notes / caveats
git format-patch -1 HEAD --minimal -U0 -w(notgit diff --no-index) because the diff tool''s parser requires zero-context bodies and a trailing--signature footer (DOM exports contain-->inheritance markers). Validated against the tool''s actual cleanup/parse algorithm.Validation
Validated locally end-to-end: the env var enables the export, the published baseline tool installs and runs, both exports generate, and the produced patch parses cleanly through the diff tool''s algorithm with zero crash-inducing lines.
Closes #7858