Skip to content

Conversation

@ArturWieczorek
Copy link
Collaborator

@ArturWieczorek ArturWieczorek commented Nov 12, 2025

Description

cardano-db-sync tar archive structure has changed in 13.6.0.5 version, with binaries now in a bin/ subdirectory and schema/ at the root.

cardano-db-sync-13.6.0.5-linux.tar.gz

ll -R
  drwxrwxr-x artur artur 4.0 KB Wed Nov 12 13:13:52 2025  ./      --
  drwxr-xr-x artur artur 4.0 KB Wed Nov 12 13:13:52 2025  ../     --
  drwxr-xr-x artur artur 4.0 KB Tue Mar 18 21:12:27 2025  bin/    --
  drwxrwxrwx artur artur 4.0 KB Tue Mar 18 21:12:27 2025  schema/ --

  ./bin:
  drwxr-xr-x artur artur 4.0 KB Tue Mar 18 21:12:27 2025  ./                           --
  drwxrwxr-x artur artur 4.0 KB Wed Nov 12 13:13:52 2025  ../                          --
  .r-xr-xr-x artur artur  76 MB Tue Mar 18 21:12:27 2025  cardano-db-sync*             --
  .r-xr-xr-x artur artur  94 MB Tue Mar 18 21:12:27 2025  cardano-db-tool*             --
  .r-xr-xr-x artur artur  25 MB Tue Mar 18 21:12:27 2025  cardano-smash-server*        --
  .r-xr-xr-x artur artur 5.4 MB Tue Mar 18 21:12:27 2025  gen-schema-docs*             --
  .r-xr-xr-x artur artur  10 MB Tue Mar 18 21:12:27 2025  http-get-json-metadata*      --
  .r-xr-xr-x artur artur  17 MB Tue Mar 18 21:12:27 2025  test-http-get-json-metadata* --

  ./schema:
  drwxrwxrwx artur artur  4.0 KB Tue Mar 18 21:12:27 2025  ./                            --
  drwxrwxr-x artur artur  4.0 KB Wed Nov 12 13:13:52 2025  ../                           --
  .r--r--r-- artur artur  762 B  Tue Mar 18 21:12:27 2025  migration-1-0000-20190730.sql --
  .r--r--r-- artur artur  1.8 KB Tue Mar 18 21:12:27 2025  migration-1-0001-20190730.sql --
  .r--r--r-- artur artur  451 B  Tue Mar 18 21:12:27 2025  migration-1-0002-20190912.sql --
  .r--r--r-- artur artur  852 B  Tue Mar 18 21:12:27 2025  migration-1-0003-20200211.sql --

Since the tar archive now includes the schema, cloning the repository is unnecessary when using the tarball.
This PR modifies the script to prevent the clone in that scenario.

  1. The script will first check if the DBSYNC_TAR_URL is set or can be derived.
  2. If the tarball URL is available, it will create a cardano-db-sync directory, download and extract the archive there, and set up the necessary symlinks and schema paths.
  3. If the tarball URL is not available, it will proceed with the original logic of cloning the git repository and building from source.

This change ensures that the git repository is only cloned when absolutely necessary.

The db-sync-node symlink correctly points to the extracted archive's root, so db-sync-node/bin/cardano-db-sync remains valid. However, DBSYNC_SCHEMA_DIR is currently set to the git repository's schema, not the
extracted tarball's. DBSYNC_SCHEMA_DIR="$PWD/schema" was updated to DBSYNC_SCHEMA_DIR="$(readlink -m db-sync-node)/schema" to correctly reference the schema from the downloaded tarball.

Related Issues / PRs

Make schema directory in tarball attached to the GitHub release writable

Update query_utxo for db-sync 13.6.0.5

@ArturWieczorek ArturWieczorek force-pushed the artur/update-db-sync-version branch from a21acdb to 621a04d Compare November 12, 2025 13:28
@ArturWieczorek
Copy link
Collaborator Author

ArturWieczorek commented Nov 12, 2025

CI Tests:

for:

NODE_REV=master
DBSYNC_REV=master
MARKEXPR="dbsync and not long"

* one failed test - not related to changes in this PR.

@ArturWieczorek ArturWieczorek force-pushed the artur/update-db-sync-version branch from 621a04d to 129512a Compare November 12, 2025 14:41
@ArturWieczorek ArturWieczorek force-pushed the artur/update-db-sync-version branch from 129512a to 2f416fe Compare November 13, 2025 13:00
@ArturWieczorek ArturWieczorek marked this pull request as ready for review November 13, 2025 13:00
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.

2 participants