Skip to content

refactor(testnets): rework db-sync bootstrap script#3516

Merged
mkoura merged 1 commit into
masterfrom
update_dbsync_bootstrap_script
Jun 26, 2026
Merged

refactor(testnets): rework db-sync bootstrap script#3516
mkoura merged 1 commit into
masterfrom
update_dbsync_bootstrap_script

Conversation

@mkoura

@mkoura mkoura commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Rename run-cardano-dbsync to run_dbsync.sh and switch its shebang from nix-shell --pure to nix develop ...#postgres, dropping the env-keep flags so DBSYNC_SCHEMA_DIR and the cardano-db-sync binary are inherited from the caller environment.

Add an optional DBSYNC_ALLOW_PRIVATE_OFFCHAIN_URLS toggle that appends --allow-private-offchain-urls for fetching off-chain anchor data from localhost, and fail early with a clear message when cardano-db-sync is not on PATH.

Rename `run-cardano-dbsync` to `run_dbsync.sh` and switch its shebang
from `nix-shell --pure` to `nix develop ...#postgres`, dropping the
env-keep flags so `DBSYNC_SCHEMA_DIR` and the `cardano-db-sync` binary
are inherited from the caller environment.

Add an optional `DBSYNC_ALLOW_PRIVATE_OFFCHAIN_URLS` toggle that appends
`--allow-private-offchain-urls` for fetching off-chain anchor data from
localhost, and fail early with a clear message when `cardano-db-sync`
is not on PATH.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the testnet bootstrap db-sync launcher by replacing the old run-cardano-dbsync script with a new run_dbsync.sh that runs under nix develop, adds optional support for allowing private off-chain anchor URLs, and validates required environment prerequisites before starting cardano-db-sync.

Changes:

  • Renames/replaces the db-sync bootstrap runner (run-cardano-dbsyncrun_dbsync.sh) and switches from nix-shell --pure to nix develop ...#postgres.
  • Adds DBSYNC_ALLOW_PRIVATE_OFFCHAIN_URLS to optionally pass --allow-private-offchain-urls.
  • Fails early with a clear message when cardano-db-sync is not available on PATH.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
testnets_bootstrap_template/run-cardano-dbsync Removed the previous nix-shell --pure-based db-sync runner.
testnets_bootstrap_template/run_dbsync.sh New nix develop-based db-sync runner with optional private off-chain URL support and prerequisite checks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread testnets_bootstrap_template/run_dbsync.sh
Comment thread testnets_bootstrap_template/run_dbsync.sh
@mkoura mkoura merged commit d404b36 into master Jun 26, 2026
2 checks passed
@mkoura mkoura deleted the update_dbsync_bootstrap_script branch June 26, 2026 15:10
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