This repository was archived by the owner on Jan 5, 2026. It is now read-only.
[Api Compat] Add support for excluding classes in compatibility check - #5124
Merged
M Rivera (mrivera-ms) merged 2 commits intoJan 26, 2021
Conversation
M Rivera (mrivera-ms)
approved these changes
Jan 26, 2021
Joel Mut (sw-joelmut)
deleted the
southworks/add/apicompat-class-exclusion
branch
September 21, 2021 12:28
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
This PR adds support for excluding classes from the API Compatibility checks.
We introduced a new pipeline variable (
ApiCompatExcludeClasses) that will let you define a comma separated list of excluded classes. Each class has to be defined as [Package]+[Class], e.g.Microsoft.Bot.Builder.AdapterExtensions, ...Then, the Compare Binaries task has been modified to not fail on issue leaving the pipeline with a SuccessWithIssues state when it founds compatibility issues.
Finally, a new PowerShell task will compare the compatibility issues found on the previous step with the list of excluded classes. If all issues have been excluded, the task will set the status as Success, otherwise it will be set as Failed.
Specific Changes
Compare Binariestask onci-api-validation-steps.ymltofailOnIssue: false.post_results_to_gitHubjob to depend oncheck_api_forinstead ofgenerate_multiconfig_var, occasionally it executes the GitHub PR Comment task before the Api Compat ones.Compatibility CheckPowerShell script after theCompare Binariestask, that will evaluate the result ofCompare Binariesand process the output based on the excluded classes.Compare Binaries.No Binary Compatibility issues.succeededOrFailed()onPublishBuildArtifactstask to upload the previous task result, eithersucceedorfailed.Insert nuget link into ApiCompat results file.task in favor ofCompatibility Checkand included some code from this task to maintain current functionality.Testing
In the following image there is a sneak peek for the pipeline output and the GitHub Pr Comments.
