internet-latency-collector: add cloud node file loader - #4312
Draft
thijsvanemmerik wants to merge 1 commit into
Draft
thijsvanemmerik wants to merge 1 commit into
thijsvanemmerik wants to merge 1 commit into
Conversation
Loads a JSON list of cloud regions, each with a code, cloud name, coordinates, a non-empty list of RIPE Atlas probe IDs and a ping target address. Validation rejects duplicates, empty fields and out-of-range coordinates so a bad file fails at load rather than halfway through a measurement cycle. Nothing consumes the loader yet.
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.
Part of measuring latency between AWS regions with the internet latency collector.
Measuring between cloud regions needs more detail per location than the collector's location list
carries: which cloud a region is in, which RIPE Atlas probes may measure from it, and the address
other regions ping to reach it. This adds
LoadNodesFromJSONininternal/collector, which readsa JSON array of those records and rejects the file when a code, cloud, probe list or coordinate
pair is missing, when a code repeats, or when the ping target is not a routable IPv4 address.
The checks matter because a bad file fails quietly. The collector drops a measurement result that
came back with no reply, so a ping target of
10.0.0.1, a private address nothing on the internetcan reach, would give you zero rows and no error. Validation turns that into an error when the
file is read.
Nothing calls the loader yet, so nothing changes in production.
Test:
go test ./controlplane/internet-latency-collector/internal/collector/ -run NodeFile