Skip to content

SK-2984 Add contract testing for v2 SDK#352

Merged
saileshwar-skyflow merged 3 commits into
SK-2967-java-sdk-add-flow-db-vault-api-support-using-modular-build-approachfrom
saileshwar/SK-2984-contract-testing
Jul 24, 2026
Merged

SK-2984 Add contract testing for v2 SDK#352
saileshwar-skyflow merged 3 commits into
SK-2967-java-sdk-add-flow-db-vault-api-support-using-modular-build-approachfrom
saileshwar/SK-2984-contract-testing

Conversation

@saileshwar-skyflow

@saileshwar-skyflow saileshwar-skyflow commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds japicmp-based public API contract testing for the v2 module, following the same committed-snapshot pattern skyflow-node uses (compare against a checked-in baseline, not a published version).
  • japicmp compares the current build against a committed baseline jar (v2/api-report/skyflow-java.baseline.jar) instead of pulling any published Maven Central version — common isn't independently published, and flowvault has no prior release to compare against yet, so no contract testing is added there in this PR.
  • A comparison-only shaded jar (v2 + common merged) is produced during the build so classes that physically live in common (Credentials, ErrorCode, BearerToken, etc.) aren't reported as false-positive removals against a self-contained baseline.
  • scripts/contract-snapshot-update.sh regenerates the committed baseline after an intentional public API change — run it and commit the updated jar alongside the code change.
  • SampleImportContractTest.java is a compile-time smoke test over the actual import statements used in samples/ and README.md, independent of japicmp's scope/excludes.
  • .github/workflows/contract-tests.yml runs the check on PRs targeting main/release/*, and posts a PR comment with the exact contract diff whenever the baseline jar itself is updated, so reviewers can see precisely what's being approved as the new contract.

Adds japicmp-based public API contract testing for the v2 module,
following the same committed-snapshot pattern skyflow-node uses:

- japicmp compares the current build against a committed baseline jar
  (v2/api-report/skyflow-java.baseline.jar) instead of a published
  Maven Central version, since common is not independently published
  and flowvault has no prior release to compare against.
- A comparison-only shaded jar (v2 + common merged) is produced so
  classes that live in common (Credentials, ErrorCode, BearerToken,
  etc.) aren't reported as false-positive removals.
- scripts/contract-snapshot-update.sh regenerates the committed
  baseline after an intentional API change.
- SampleImportContractTest.java is a compile-time smoke test over the
  actual import statements used in samples/ and README.md.
- .github/workflows/contract-tests.yml runs the check on PRs and posts
  a PR comment with the exact contract diff whenever the baseline jar
  itself is updated.
japicmp against the committed baseline snapshot is the load-bearing
check; this compile-time import smoke test was a supplementary layer
and not required.
@saileshwar-skyflow
saileshwar-skyflow merged commit 7caa863 into SK-2967-java-sdk-add-flow-db-vault-api-support-using-modular-build-approach Jul 24, 2026
0 of 3 checks passed
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.

3 participants