Skip to content

fix(ci): resolve the SQLite JDBC jar from the vendored tree, not Maven - #4730

Open
bpamiri wants to merge 2 commits into
developfrom
fix/sqlite-jdbc-vendored
Open

bpamiri wants to merge 2 commits into
developfrom
fix/sqlite-jdbc-vendored

Conversation

@bpamiri

@bpamiri bpamiri commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Removes Maven Central as a dependency of CI's SQLite JDBC staging. tools/ci/fetch-sqlite-jdbc.sh still downloaded sqlite-jdbc from repo1.maven.org, so every caller inherited that host's availability: snapshot run 46814892894 (Lucee 7 + SQLite (LuCLI)) failed with Could not download a verified sqlite-jdbc 3.50.3.0 on a commit that only touched the benchmark pilot, plus earlier transient reds on CLI suite/Deploy CLI tests + verb smoke. The jar has been vendored since #4709 (tools/docker/lib/sqlite-jdbc-3.50.3.0.jar); this converts the last consumer.

Change

  • No network at all. The script resolves from the tree:
    • default (no args): tools/docker/lib/sqlite-jdbc-3.50.3.0.jar;
    • explicit version sha256: searches tools/docker/lib, tools/docker/adobe{2021,2023,2025}/lib, cli/lucli/resources/extensions/sqlite, tools/lucee-extensions/sqlite/src, and accepts the first file whose SHA-256 matches.
    • The download branch is deleted. An unknown/unvendorable version fails with ::error:: and the candidate locations checked — it does not silently fetch.
  • Checksum verification kept and doubled: every candidate is verified before selection, and the destination is verified after the copy. Wrong hash / corrupt jar / unknown version fail loudly (demonstrated below).
  • Version question answered (also in the script header): two versions are intentional. 3.50.3.0 is the framework/Docker CI driver (Adobe/Lucee images). 3.49.1.0 is what the LuCLI runtime ships (cli/lucli/resources/extensions/sqlite/org.xerial.sqlite-jdbc-3.49.1.0.jar, sha256 38d783…) and what the Lucee extension is built from (tools/lucee-extensions/sqlite/src/sqlite-jdbc-3.49.1.0.jar, sha256 5c8609…) — the two 3.49.1.0 files are differently packaged and have different hashes. tools/test-local.sh, test-cli-local.sh, test-cli-e2e.sh pass 3.49.1.0 5c8609… and now resolve it from the extension source jar; the default CI path keeps 3.50.3.0. Reconciling them is a deliberate CLI/extension decision, not a cleanup, so they are left as-is and documented.
  • Caller messages now say "Staging … from the vendored tree" instead of "Downloading".
  • Snapshot workflow is dispatchable for this diagnosis: added workflow_dispatch, and made the release-publishing build job and deploy-api-snapshot push-only, so dispatching never publishes a snapshot or redeploys the API from a branch. Normal develop pushes behave exactly as before.

Offline proof (no network)

Ran with HTTPS_PROXY=http://127.0.0.1:9 HTTP_PROXY=… ALL_PROXY=… (dead proxy):

$ HTTPS_PROXY=http://127.0.0.1:9 bash tools/ci/fetch-sqlite-jdbc.sh /tmp/jdbc-default.jar
sqlite-jdbc 3.50.3.0 resolved from the tree and verified (sha256 a3f53a2a…cf08):
  tools/docker/lib/sqlite-jdbc-3.50.3.0.jar -> /tmp/jdbc-default.jar
exit 0; sha256(/tmp/jdbc-default.jar) = a3f53a2a…cf08

$ … fetch-sqlite-jdbc.sh /tmp/jdbc-349.jar 3.49.1.0 5c8609d2…c39291
sqlite-jdbc 3.49.1.0 resolved from the tree and verified …:
  tools/lucee-extensions/sqlite/src/sqlite-jdbc-3.49.1.0.jar -> /tmp/jdbc-349.jar
exit 0; sha256 = 5c8609d2…c39291

$ … fetch-sqlite-jdbc.sh /tmp/jdbc-bad.jar 3.50.3.0 deadbeef
::error::No vendored sqlite-jdbc 3.50.3.0 with sha256 deadbeef found … Vendor the jar … instead of downloading it at build time.
exit 1

$ … fetch-sqlite-jdbc.sh /tmp/jdbc-x.jar 9.9.9.9 0000
::error::No vendored sqlite-jdbc 9.9.9.9 with sha256 0000 found …
exit 1

No curl remains in the script.

Verification

  • Full local suite: 7,443 passed.
  • Snapshot workflow dispatch on this branch: Lucee 7 + SQLite (LuCLI) runs the same staging path; run link below.
  • PR CI link below; build/deploy-api-snapshot skipped on the dispatch by design (push-only).

Results (head e99cb73b9)

  • Snapshot dispatch is green — run 47037727344 (workflow_dispatch): Lucee 7 + SQLite (LuCLI) success, with the log showing the non-network staging path:
    sqlite-jdbc 3.50.3.0 resolved from the tree and verified (sha256 a3f53a2a…cf08):
      /home/runner/work/wheels/wheels/tools/docker/lib/sqlite-jdbc-3.50.3.0.jar -> /tmp/sqlite-jdbc.jar
    Results: 7451 passed, 0 failed, 0 errors
    [CLI Tests] Results: 2463 passed, 0 failed, 0 errors
    
    build and deploy-api-snapshot are skipped on the dispatch by the new push-only guards; a develop push still runs them as before.
  • PR CI on e99cb73b9: CLEAN (12 pass, 1 skipping, 0 failing).
  • grep -c curl tools/ci/fetch-sqlite-jdbc.sh → 0 (no download path remains).
  • First snapshot dispatch (47036985230) exposed a CLI source-scan spec (CliHardenerS1S10Spec) asserting the fetcher contains no literal 3.49.1.0; the explanatory comment spelled it out. Reworded the comment (exact hashes stay in the callers/PR), CLI suite green, and the second dispatch above is the clean run.

What this now proves / does not

  • Proves: the default CI staging path and the explicit 3.49.1.0 path resolve from the tree, verify SHA-256, and never touch the network; a wrong hash or unknown version fails loudly; the snapshot fast-test runs green without Maven Central.
  • Does not change: the .lex extension build (tools/lucee-extensions/sqlite) and tools/distribution-drafts/linux-packages/build-linux-packages.sh, which still reference Maven/3.49.1.0 for their own artifact builds. They are not on the CI staging path; reconciling their 3.49.1.0 source jar with the CLI-shipped jar is a separate deliberate decision and is recorded above.

fetch-sqlite-jdbc.sh still downloaded sqlite-jdbc from repo1.maven.org, so
every CI path that stages the driver inherited Maven Central's 429/404
availability (snapshot run 46814892894, plus transient CLI-suite reds).

Resolve the jar from the tree instead: the default 3.50.3.0 comes from
tools/docker/lib (same bytes as the Adobe image copies), and an explicit
version+sha256 searches the known vendored locations and accepts the first
file whose SHA-256 matches. Every candidate and the destination are verified,
so a corrupted or wrong jar still fails loudly, and an unknown version errors
with the locations checked instead of falling back to the network. There is no
download branch at all now.

The two versions are intentional and documented in the script: 3.50.3.0 is the
framework/Docker CI driver; 3.49.1.0 is the version the LuCLI runtime ships and
the Lucee extension is built from (their two jars are differently packaged and
have different SHA-256s), so callers keep passing the version and hash they
need.

Also make the snapshot workflow dispatchable for exactly this diagnosis, while
keeping the release-publishing build and the API deploy push-only so a dispatch
can never publish a snapshot or redeploy the API from a branch. Caller messages
now say "staging" instead of "downloading".

Signed-off-by: Peter Amiri <peter@alurium.com>
CliHardenerS1S10Spec asserts the fetcher contains no literal 3.49.1.0 (it used
to fork the default); the explanatory comment spelled it out and tripped the
guard. Keep the exact hashes in the callers/PR and refer to the CLI-staged
3.49.1.x here.

Signed-off-by: Peter Amiri <peter@alurium.com>

This branch has not been deployed

No deployments
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