Skip to content

fix(cli): repair load_wallets_on_start import after indexer rename#240

Open
rdmcd wants to merge 1 commit intoOpenBuilders:mainfrom
rdmcd:fix/load-wallets-on-start-import
Open

fix(cli): repair load_wallets_on_start import after indexer rename#240
rdmcd wants to merge 1 commit intoOpenBuilders:mainfrom
rdmcd:fix/load-wallets-on-start-import

Conversation

@rdmcd
Copy link
Copy Markdown
Contributor

@rdmcd rdmcd commented May 4, 2026

Summary

  • core/cli/load_wallets_on_start.py imports indexer.tasks, which no longer exists — the package was split into indexer_blockchain / indexer_gifts / indexer_price / indexer_stickers and this CLI was missed.
  • python -m core.cli.load_wallets_on_start raises ModuleNotFoundError: No module named 'indexer' on import, before any DB read or Redis write happens.
  • This breaks the only in-tree recovery path for the external wallet-tracking Redis (REDIS_TRANSACTION_DB). After any loss of that DB (volume reset, FLUSHDB, OOM before BGSAVE, etc.) tracked wallets cannot be re-seeded from the database, and transaction-lookup stops emitting noticed_wallets events for the affected addresses — leading to stale on-chain ownership in the local DB and members not being kicked when they no longer meet eligibility rules.

Fix

One-line rename of the import:

-from indexer.tasks import fetch_wallet_details
+from indexer_blockchain.tasks import fetch_wallet_details

Test plan

  • Built Dockerfile.indexer-blockchain against this branch.
  • python -c "from core.cli.load_wallets_on_start import load_wallets_on_start" resolves successfully inside the container (was failing with ModuleNotFoundError on main).

The CLI imported `from indexer.tasks ...`, but the package was
renamed to `indexer_blockchain` and the CLI was missed. Running
`python -m core.cli.load_wallets_on_start` raised ModuleNotFoundError
before any side effect, so the recovery path for the external
wallet-tracking Redis was unavailable.
Copilot AI review requested due to automatic review settings May 4, 2026 11:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Repairs the core CLI module load_wallets_on_start by updating an outdated import to the post-split indexer package layout, restoring the ability to enqueue wallet-detail fetch tasks and re-seed the external wallet-tracking Redis after data loss.

Changes:

  • Update fetch_wallet_details import from the removed indexer.tasks module to indexer_blockchain.tasks.

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

@danoctua
Copy link
Copy Markdown
Collaborator

danoctua commented May 7, 2026

I recommend decommissioning this CLI, since there is no one with cluster access, and it is only for local development.

Unless you see a use for it.

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.

3 participants