-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Detect breaking changes on pull requests v2.0 #12974
Detect breaking changes on pull requests v2.0 #12974
Conversation
Adds a gradle task and github action to check for breaking changes made to the APIs in server by running comparison against most resent snapshot build on sonotype maven repository. Only classes with @publicapi are checked for breaking changes. Uses japicmp to perform the comparison against the jar files, learn more https://siom79.github.io/japicmp/ Signed-off-by: Peter Nied <[email protected]>
Compatibility status:Checks if related components are compatible with change 6ce041e Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/performance-analyzer.git] |
Do you have an example of the report in case of breaking change, just to share on pull request description with everyone, thank you |
@reta Good idea as always! I've updated the description to include a link to an example along side the output of a failure. |
@bbarani @gaiksaya @andrross @kotwanikunal Any thoughts on this change before we start enforcing it? |
@peternied Looks reasonable to me. |
+1 Looks good to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peternied For in between major versions making intentional breaking change to this APIs I believe this check would fail. Would we hard merge then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@gaiksaya Public APIs are promises to our development partners of how our software works - it should be hard to break these promises. There will be good reasons to break them including security vulnerabilities, useful features [1], or to remove unused parts of the product [2]. Pull request check failures are a good signal - maintainers can still bypass and merge, but we can evaulate over time if we want a stronger enforcement or more formalized workaround process in place.
|
(cherry picked from commit 2dc071f) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Srikanth Padakanti <[email protected]>
(cherry picked from commit 2dc071f) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: Peter Nied <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Peter Nied <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
Description
Adds a gradle task and github action to check for breaking changes made to the APIs in server by running comparison against most resent snapshot build on sonotype maven repository.
Only classes with
@PublicApi
are checked for breaking changes.Uses japicmp to perform the comparison against the jar files, learn more https://siom79.github.io/japicmp/
Example
Workflow failure where a plugin method was removed [link]
Related Issues
Check List
New functionality includes testing.All tests passNew functionality has been documented.New functionality has javadoc addedPublic documentation issue/PR createdBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.