Skip to content

fix(network): exclude indexers that don't report a graph-node version - #1230

Open
chriswessels wants to merge 1 commit into
graphprotocol:mainfrom
graphops:feat/require-graph-node-version
Open

chriswessels wants to merge 1 commit into
graphprotocol:mainfrom
graphops:feat/require-graph-node-version

Conversation

@chriswessels

Copy link
Copy Markdown
Contributor

VersionFilter::check enforces min_graph_node_version only when an indexer's graph-node reports its version. If the /status { version { version } } query fails or returns no version, the indexer still receives queries, so it can skip the minimum just by not reporting a version.

This change treats a missing graph-node version the same way as a missing indexer-service version: the indexer is unavailable, with a no status: failed to query graph-node version: … reason, until it reports one. An indexer below the minimum is still not supported: graph-node version below minimum. This resolves the TODO that held off the check until more graph-nodes reported their version.

  • Impact: indexers whose graph-node can't answer { version { version } } stop receiving queries from a gateway running this change. Failed lookups aren't cached, so an indexer comes back as soon as it reports a version.
  • Docs: the min_graph_node_version config comment now says so.
  • Related: feat: serve gateway version and indexer requirements at /version #1229 documents the current behaviour, where an indexer whose graph-node doesn't report its version is not excluded. Whichever PR merges second should drop that caveat.

Validation:

  • cargo +nightly fmt --all -- --check
  • cargo +stable clippy --all-targets -- -Dwarnings --force-warn deprecated --force-warn dead-code
  • cargo +stable test: 54 passed, including 4 new VersionFilter tests against a local indexer-service stub. They cover acceptance, a graph-node that doesn't report its version, a graph-node below the minimum, and an indexer-service below the minimum.

VersionFilter enforced min_graph_node_version only when an indexer's
graph-node reported its version. An indexer whose /status query failed
or returned no version still received queries, so the minimum could be
bypassed just by not reporting.

Treat a missing graph-node version like a missing indexer-service
version: the indexer is unavailable with a "no status" reason until it
reports one. This resolves the TODO that deferred the check until more
graph-nodes reported their version.
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