Repository navigation
fix(network): exclude indexers that don't report a graph-node version - #1230
Open
chriswessels wants to merge 1 commit into
Open
chriswessels wants to merge 1 commit into
chriswessels wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VersionFilter::checkenforcesmin_graph_node_versiononly 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 stillnot supported: graph-node version below minimum. This resolves the TODO that held off the check until more graph-nodes reported their version.{ 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.min_graph_node_versionconfig comment now says so.Validation:
cargo +nightly fmt --all -- --checkcargo +stable clippy --all-targets -- -Dwarnings --force-warn deprecated --force-warn dead-codecargo +stable test: 54 passed, including 4 newVersionFiltertests 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.