feat: [DevOps] Add API compatibility check to spec-update workflow#856
Conversation
CharlesDuboisSAP
left a comment
There was a problem hiding this comment.
Could you open a PR with breaking changes on one of the spec repos so we can see what the error would look like
Unfortunately, I can't until we merge this. I tried it forgetting the same fact and these results. Though the test run proved as an example of the problem where there are multiple breaking changes and nothing was caught without some additional measure |
You could modify the workflow on your PR of document grounding, which would call the modified workflow your branch |
|
The test succeeded 🎆 Workflow run that successfully caught breaking changes. |
Context
AI/ai-sdk-java-backlog#370.
Adds japicmp to detect breaking Java API changes when service teams update their OpenAPI specifications. This prevents spec changes from silently breaking SDK users by catching binary/source incompatible modifications to generated code.
Problem: Previously, the spec-update workflow only failed if code generation or compilation failed. Breaking changes to classes/methods/fields not covered by tests went undetected — resulting in breaking SDK releases.
Solution: After generating new code from an updated spec, japicmp compares the newly built JAR against a baseline JAR built from
main. If any public API surface changed in a binary or source incompatible way, the workflow fails and reports the details.Feature scope:
pom.xml(<pluginManagement>)<includes>:core—core.client,core.modelorchestration—orchestration.modeldocument-grounding—grounding.client,grounding.modelprompt-registry—prompt.registry.client,prompt.registry.modelsap-rpt—foundationmodels.rpt.generatedspec-update.yaml(usesgit worktreefororigin/main).mdto job summary)MODULE_PATHoutput to download step (single source of truth for service→module mapping)Definition of Done
Tests cover the scope above(tested by running the workflow itself)Error handling created / updatedAligned changes with the JavaScript SDKDocumentation updatedRelease notes updated