Update logic for sourcing db-sync to work with new tarball structure #3197
+54
−49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
cardano-db-synctar archive structure has changed in13.6.0.5version, with binaries now in abin/subdirectory andschema/at the root.cardano-db-sync-13.6.0.5-linux.tar.gz
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.
DBSYNC_TAR_URLis set or can be derived.cardano-db-syncdirectory, download and extract the archive there, and set up the necessary symlinks and schema paths.This change ensures that the git repository is only cloned when absolutely necessary.
The
db-sync-nodesymlink correctly points to the extracted archive's root, sodb-sync-node/bin/cardano-db-syncremains valid. However,DBSYNC_SCHEMA_DIRis currently set to the git repository's schema, not theextracted tarball's.
DBSYNC_SCHEMA_DIR="$PWD/schema"was updated toDBSYNC_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