Skip to content

SK-3037 stop publishing the contract-testing comparison jar - #403

Open
saileshwar-skyflow wants to merge 1 commit into
flowvault-release/26.8.1from
saileshwar/SK-3037-remove-contract-testing-jar
Open

SK-3037 stop publishing the contract-testing comparison jar#403
saileshwar-skyflow wants to merge 1 commit into
flowvault-release/26.8.1from
saileshwar/SK-3037-remove-contract-testing-jar

Conversation

@saileshwar-skyflow

Copy link
Copy Markdown
Collaborator

The problem

The comparison jar the contract gate builds was being published.

shadedArtifactAttached makes it a real project artifact, and Maven installs and
deploys attached artifacts. A deploy to a throwaway local repo shows exactly what
would have reached jfrog and Maven Central:

skyflow-flowvault-java-<v>.jar
skyflow-flowvault-java-<v>.pom
skyflow-flowvault-java-<v>-sources.jar
skyflow-flowvault-java-<v>-tests.jar
skyflow-flowvault-java-<v>-with-common.jar   ← should never have shipped

Same for skyvault. It is a build input for japicmp, not something a consumer
should be able to resolve — and it contains the whole SDK plus common under a
classifier, so anyone who found it would get a second, silently divergent copy of
the library.

This came in with #397, so it is live on the next release. Nothing has shipped with
it yet.

The fix

Two changes, so this cannot recur by accident:

1. Never attach it. Switched to shade's outputFile, which writes the jar to
disk and attaches nothing. No artifact, so nothing to install or deploy.

2. Move it out of the modules. It now lands in the repo-root api-report/build/
(gitignored). Nothing under a module directory can package or publish what it cannot
see — the guarantee is structural, not a setting someone has to remember.

The committed baselines move the same way, <module>/api-report/ → repo-root
api-report/. They were never packaged — api-report/ is not a resource directory,
and they appear zero times inside every built jar — but keeping the contract
fixtures out of the source trees makes that structural too.

api-report/
  skyflow-java.baseline.jar                    committed — the approved contract
  skyflow-flowvault-java.baseline.jar          committed
  build/                                       gitignored — comparison jars

Also set createDependencyReducedPom=false on this execution. It is a second shade
run whose only job is to produce a comparison file; it has no business rewriting the
pom the module publishes.

Verification

A real mvn deploy to a throwaway repo now publishes exactly this, per module:

skyvault flowvault
skyflow-java-2.1.1.jar skyflow-flowvault-java-<v>.jar
skyflow-java-2.1.1.pom skyflow-flowvault-java-<v>.pom
skyflow-java-2.1.1-sources.jar skyflow-flowvault-java-<v>-sources.jar
skyflow-java-2.1.1-tests.jar skyflow-flowvault-java-<v>-tests.jar

No with-common, and find skyvault flowvault common -name "*with-common*" returns
nothing.

Also: both contract gates pass reading the new paths; contract-snapshot-update.sh
regenerates from api-report/build/; common 158 and flowvault 674 tests pass;
YAML parses; cspell clean across 305 files.

skyvault's 3 ConnectionClientTests failures are pre-existing and unrelated — they
need the real SKYFLOW_CREDENTIALS secret, which CI supplies.

No source, README or release-workflow changes.

The comparison jar the contract gate builds was being published. shadedArtifactAttached
makes it a real project artifact, and Maven installs and deploys attached artifacts, so
a deploy to a throwaway repo showed exactly what would reach jfrog and Maven Central:

    skyflow-flowvault-java-<v>.jar
    skyflow-flowvault-java-<v>.pom
    skyflow-flowvault-java-<v>-sources.jar
    skyflow-flowvault-java-<v>-tests.jar
    skyflow-flowvault-java-<v>-with-common.jar   <- should never have shipped

Same for skyvault. It is a build input for japicmp, not something a consumer should be
able to resolve - and it duplicates the whole SDK plus common under a classifier, so
anyone who found it would get a second, silently divergent copy of the library.

Switched to shade's outputFile, which writes the jar to disk and attaches nothing, and
moved it out of the modules entirely: it now lands in the repo-root api-report/build/,
gitignored. Nothing under a module directory can package or publish what it cannot see.

The committed baselines move the same way, from <module>/api-report/ to the repo-root
api-report/. They were never packaged - api-report/ is not a resource directory, and
they appear zero times inside every built jar - but keeping the contract fixtures out of
the source trees makes that structural rather than something to re-verify each time.

Also set createDependencyReducedPom=false on this execution: it is a second shade run
whose only job is to produce a comparison file, and it has no business rewriting the pom
the module publishes.

Verified: a real deploy now publishes exactly the four expected artifacts per module and
no with-common; both contract gates pass reading the new paths; the snapshot script
regenerates from api-report/build/; common 158, flowvault 674 tests pass; YAML parses;
cspell clean. skyvault's 3 ConnectionClientTests failures are pre-existing and need the
real SKYFLOW_CREDENTIALS secret, which CI supplies.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Contract baseline added (skyvault)

This PR adds api-report/skyflow-java.baseline.jar, the approved public API contract for this module.

api-report/skyflow-java.baseline.jar is new in this PR - skyvault had no committed baseline before, so there is nothing to diff against.

This snapshot becomes the approved contract: every later PR is compared against it, and any incompatible change fails the Contract Tests (skyvault) job until someone regenerates it deliberately. Review it as the starting point, not as a change.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Contract baseline added (flowvault)

This PR adds api-report/skyflow-flowvault-java.baseline.jar, the approved public API contract for this module.

api-report/skyflow-flowvault-java.baseline.jar is new in this PR - flowvault had no committed baseline before, so there is nothing to diff against.

This snapshot becomes the approved contract: every later PR is compared against it, and any incompatible change fails the Contract Tests (flowvault) job until someone regenerates it deliberately. Review it as the starting point, not as a change.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.30%. Comparing base (a496119) to head (9130a72).

Additional details and impacted files
@@                     Coverage Diff                     @@
##             flowvault-release/26.8.1     #403   +/-   ##
===========================================================
  Coverage                       91.30%   91.30%           
  Complexity                        454      454           
===========================================================
  Files                             157      157           
  Lines                            6392     6392           
  Branches                          850      850           
===========================================================
  Hits                             5836     5836           
  Misses                            364      364           
  Partials                          192      192           
Flag Coverage Δ
common 88.38% <ø> (ø)
flowvault 88.65% <ø> (ø)
skyvault 94.72% <ø> (ø)
unittests-flowvault 89.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Module: common 88.38% <ø> (ø)
Module: skyvault 94.72% <ø> (ø)
Module: flowvault 88.65% <ø> (ø)
Service Account 86.69% <ø> (ø)
Vault Data 91.42% <ø> (ø)
Vault Tokens 99.03% <ø> (ø)
Vault Connection 100.00% <ø> (ø)
Vault Controller 85.31% <ø> (ø)
Detect 100.00% <ø> (ø)
Audit 100.00% <ø> (ø)
BIN Lookup 100.00% <ø> (ø)
Config 96.26% <ø> (ø)
Utils 89.21% <ø> (ø)
Errors 100.00% <ø> (ø)
Enums 100.00% <ø> (ø)
Logs 95.32% <ø> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a496119...9130a72. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant