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

Add binary API compatibility checks to v1 branch #1427

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

alancai98
Copy link
Member

Relevant Issues

Description

PR shows the current set of public APIs in all of our published libraries. I used https://github.com/Kotlin/binary-compatibility-validator gradle plugin which maintains a list of public binary APIs (as a .api file committed to our project). By default, the gradle task will run the apiCheck task. If there's a change to the public API (adding, modifying, deleting anything public), the apiCheck task will fail. To fix the failure, we can run apiDump to update the .api file(s) and commit the changes.

Other Information

License Information

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@alancai98 alancai98 self-assigned this Apr 12, 2024
@alancai98 alancai98 changed the title Add binary API compatibility checks Add binary API compatibility checks to v1 branch Apr 12, 2024
@@ -31,6 +32,7 @@ object Versions {
}

object Plugins {
const val binaryCompatibilityValidator = "org.jetbrains.kotlinx:binary-compatibility-validator:${Versions.binaryCompatibilityValidator}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apply binary compatibility checks for any published package.

Comment on lines +78 to +88
apiValidation {
/**
* Classes (fully qualified) that are excluded from public API dumps even if they
* contain public API.
*/
ignoredClasses.addAll(
listOf(
"org.partiql.lang.compiler.PartiQLCompilerPipeline" // deprecated
)
)
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example configuration for a specific package to ignore a certain, deprecated class. The Kotlin binary API compatibility checker provides some more configurability here -- https://github.com/Kotlin/binary-compatibility-validator/tree/master?tab=readme-ov-file#optional-parameters.

Copy link

Conformance comparison report-Cross Engine

Base (legacy) eval +/-
% Passing 92.52% 82.12% -10.40%
✅ Passing 5383 4778 -605
❌ Failing 435 1040 605
🔶 Ignored 0 0 0
Total Tests 5818 5818 0
Number passing in both: 4606

Number failing in both: 263

Number passing in legacy engine but fail in eval engine: 777

Number failing in legacy engine but pass in eval engine: 172
⁉️ CONFORMANCE REPORT REGRESSION DETECTED ⁉️
The complete list can be found in GitHub CI summary, either from Step Summary or in the Artifact.
172 test(s) were failing in legacy but now pass in eval. Before merging, confirm they are intended to pass.
The complete list can be found in GitHub CI summary, either from Step Summary or in the Artifact.

Conformance comparison report-Cross Commit-LEGACY

Base (04e33a8) 38487f6 +/-
% Passing 92.51% 92.52% 0.02%
✅ Passing 5382 5383 1
❌ Failing 436 435 -1
🔶 Ignored 0 0 0
Total Tests 5818 5818 0
Number passing in both: 5382

Number failing in both: 435

Number passing in Base (04e33a8) but now fail: 0

Number failing in Base (04e33a8) but now pass: 1
The following test(s) were previously failing but now pass. Before merging, confirm they are intended to pass:

Click here to see
  • MYSQL_SELECT_29, compileOption: LEGACY

Conformance comparison report-Cross Commit-EVAL

Base (04e33a8) 38487f6 +/-
% Passing 82.12% 82.12% 0.00%
✅ Passing 4778 4778 0
❌ Failing 1040 1040 0
🔶 Ignored 0 0 0
Total Tests 5818 5818 0
Number passing in both: 4778

Number failing in both: 1040

Number passing in Base (04e33a8) but now fail: 0

Number failing in Base (04e33a8) but now pass: 0

@alancai98 alancai98 merged commit 801091c into v1 Apr 24, 2024
14 checks passed
@alancai98 alancai98 deleted the add-binary-compatibility-checks-v1 branch April 24, 2024 20:39
alancai98 added a commit that referenced this pull request Apr 24, 2024
@alancai98 alancai98 mentioned this pull request Apr 24, 2024
alancai98 added a commit that referenced this pull request Apr 24, 2024
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.

2 participants