Skip to content

refactor(indexer): rename the replay tool to backfill - #1421

Open
tt-cll wants to merge 1 commit into
tt/indexer-generate-docs-cwdfrom
tt/indexer-backfill-rename
Open

refactor(indexer): rename the replay tool to backfill#1421
tt-cll wants to merge 1 commit into
tt/indexer-generate-docs-cwdfrom
tt/indexer-backfill-rename

Conversation

@tt-cll

@tt-cll tt-cll commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Description

Testing

Checklist

  • Breaking changes documented in changelog (see changelog directory)
  • Cross link related PRs (in this or other repositories)

Stack created with GitHub Stacks CLIGive Feedback 💬

@tt-cll
tt-cll requested review from a team as code owners September 5, 2026 19:03
@tt-cll
tt-cll force-pushed the tt/indexer-backfill-rename branch from 4168d17 to 138dfef Compare September 9, 2026 11:20
Copilot AI lite review requested due to automatic review settings September 9, 2026 12:38
@tt-cll
tt-cll force-pushed the tt/indexer-backfill-rename branch from 138dfef to 1e20222 Compare September 9, 2026 12:38

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.

🔵 Needs a closer look

The advisory-lock key prefix change can allow concurrent execution across old/new binaries during rollout, undermining the crash-recovery mutual exclusion guarantee.

Pull request overview

This PR renames the indexer “replay” tool/module to “backfill” to avoid terminology collisions, updating the Go package naming, CLI surface, documentation, and supporting build/test wiring.

Changes:

  • Renamed the Go package (and public-facing CLI strings/logs/errors) from replay → backfill across the indexer backfill engine.
  • Updated build artifacts and container images to produce /bin/indexer-backfill instead of /bin/indexer-replay.
  • Updated E2E smoke tests and CI workflow patterns to target the renamed backfill CLI/tests.
File summaries
File Description
indexer/pkg/storage/postgres.go Updates storage comments to refer to “backfill” terminology.
indexer/pkg/backfill/types.go Renames package and user-facing error strings/comments from replay → backfill.
indexer/pkg/backfill/types_test.go Updates test package name to backfill.
indexer/pkg/backfill/store.go Renames error strings and lock-key prefix to backfill; adds table-name compatibility note.
indexer/pkg/backfill/README.md Renames module docs and CLI examples to indexer-backfill; documents rename rationale.
indexer/pkg/backfill/message.go Renames message replay runner/function/log strings to backfill.
indexer/pkg/backfill/engine.go Renames engine terminology, logger name, and error strings to backfill.
indexer/pkg/backfill/engine_test.go Renames tests/helpers/types to backfill terminology.
indexer/pkg/backfill/discovery.go Renames discovery replay runner/function/log strings to backfill.
indexer/Justfile Renames build target to build-backfill and output binary name.
indexer/Dockerfile.dev Builds /bin/indexer-backfill from cmd/backfill.
indexer/Dockerfile Builds and copies /bin/indexer-backfill into the final image.
indexer/cmd/backfill/main.go Renames CLI app name/usage/commands and switches imports to pkg/backfill.
build/devenv/tests/e2e/smoke_backfill_cli_test.go Updates E2E smoke tests to execute indexer-backfill and renamed tests/messages.
.github/workflows/test-smoke.yaml Updates smoke workflow entry to run TestE2ESmoke_Backfill*.
Review details

Suppressed comments (1)

indexer/pkg/backfill/store.go:158

  • Changing the advisory-lock key prefix from replay: to backfill: can break crash-recovery / mutual exclusion during rollout: an older indexer-replay process and the new indexer-backfill process could acquire different locks for the same job ID and run concurrently. Since the table name remains replay_jobs for migration compatibility, it’s safer to keep the lock key stable as well (or otherwise coordinate a one-time migration/compat layer).
  • Files reviewed: 15/15 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@tt-cll
tt-cll force-pushed the tt/indexer-backfill-rename branch from 1e20222 to e438089 Compare September 9, 2026 16:20
@tt-cll
tt-cll force-pushed the tt/indexer-backfill-rename branch from e438089 to 9a04fd0 Compare September 9, 2026 19:36
@tt-cll
tt-cll force-pushed the tt/indexer-backfill-rename branch from 9a04fd0 to 2f34a98 Compare September 9, 2026 23:10
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Code coverage report:

Package main tt/indexer-backfill-rename Diff
github.com/smartcontractkit/chainlink-ccv/aggregator 50.82% 50.86% +0.04%
github.com/smartcontractkit/chainlink-ccv/bootstrap 72.00% 72.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/cli 58.12% 58.12% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 35.65% 35.65% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 48.32% 48.50% +0.18%
github.com/smartcontractkit/chainlink-ccv/executor 42.80% 42.80% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 39.55% 35.59% -3.96%
github.com/smartcontractkit/chainlink-ccv/integration 60.31% 60.31% +0.00%
github.com/smartcontractkit/chainlink-ccv/internal 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/migration 78.70% 78.70% +0.00%
github.com/smartcontractkit/chainlink-ccv/pkg 100.00% 100.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 63.46% 63.46% +0.00%
github.com/smartcontractkit/chainlink-ccv/tools 43.61% 43.61% +0.00%
github.com/smartcontractkit/chainlink-ccv/verifier 36.40% 36.73% +0.33%
Total 51.90% 50.80% -1.10%

Files removed (from main):

  • github.com/smartcontractkit/chainlink-ccv/indexer/cmd/replay/main.go
  • github.com/smartcontractkit/chainlink-ccv/indexer/pkg/replay/discovery_replay.go
  • github.com/smartcontractkit/chainlink-ccv/indexer/pkg/replay/engine.go
  • github.com/smartcontractkit/chainlink-ccv/indexer/pkg/replay/message_replay.go
  • github.com/smartcontractkit/chainlink-ccv/indexer/pkg/replay/store.go
  • github.com/smartcontractkit/chainlink-ccv/indexer/pkg/replay/types.go
  • github.com/smartcontractkit/chainlink-ccv/verifier/pkg/storagewriter/backoff.go

Files added (in tt/indexer-backfill-rename):

  • github.com/smartcontractkit/chainlink-ccv/common/backoff.go
  • github.com/smartcontractkit/chainlink-ccv/indexer/cmd/backfill/main.go
  • github.com/smartcontractkit/chainlink-ccv/indexer/pkg/backfill/discovery.go
  • github.com/smartcontractkit/chainlink-ccv/indexer/pkg/backfill/engine.go
  • github.com/smartcontractkit/chainlink-ccv/indexer/pkg/backfill/message.go
  • github.com/smartcontractkit/chainlink-ccv/indexer/pkg/backfill/store.go
  • github.com/smartcontractkit/chainlink-ccv/indexer/pkg/backfill/types.go
  • github.com/smartcontractkit/chainlink-ccv/verifier/pkg/vtypes/decorator.go

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