Skip to content

Fix indexer/aggregator object lifecycles.#963

Closed
winder wants to merge 3 commits intomainfrom
will/indexer-lifecycle
Closed

Fix indexer/aggregator object lifecycles.#963
winder wants to merge 3 commits intomainfrom
will/indexer-lifecycle

Conversation

@winder
Copy link
Collaborator

@winder winder commented Mar 23, 2026

Indexer Scheduler

Tests were not properly stopping the service, this led to random panics causing go test to fail even though the tests themselves pass. There were other lifecycle issues such as not waiting for the worker to exit when Stop() is called, and a hang if Stop() were to be called twice.

Aggregator Batch Handler

This service returns immediately if the context is cancelled, but causes a race condition with the underlying goroutine in tests. The test ends but logs are still being written while the service shuts down.

Fix

This change adds more robust lifecycle management.

This PR replaces (and hopefully fixes) #958, which is failing due to the build-cl action attempting to go get a commit hash that doesn't exist.

@winder winder changed the title Fix indexer scheduler lifecycle. Fix indexer/aggregator object lifecycles. Mar 23, 2026
@github-actions
Copy link

Code coverage report:

Package main will/indexer-lifecycle diff
github.com/smartcontractkit/chainlink-ccv/aggregator 47.95% 47.92% -0.03%
github.com/smartcontractkit/chainlink-ccv/bootstrap 42.35% 42.35% +0.00%
github.com/smartcontractkit/chainlink-ccv/cli 86.39% 86.39% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 50.74% 50.74% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 46.42% 46.42% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 42.65% 42.71% +0.06%
github.com/smartcontractkit/chainlink-ccv/integration 45.38% 45.27% -0.11%
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 68.69% 68.69% +0.00%
github.com/smartcontractkit/chainlink-ccv/verifier 33.10% 33.10% +0.00%

@winder winder closed this Mar 23, 2026
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.

1 participant