feat(rpki): add RPKISPOOL historical source#141
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for loading historical RPKI data from the new RPKISPOOL source (via bgpkit-commons) and updates the CLI defaults so dated rpki roas / rpki aspas queries use RPKISPOOL (Sobornost mirror) by default, while still supporting RIPE and RPKIViews and rejecting invalid source/collector combinations.
Changes:
- Added
RpkiSpoolsas a historical data source and wired it through the RPKI lens’ historical loading path. - Implemented RPKISPOOL collector parsing and made
rpkispoolsthe default historical source when a date is specified. - Updated CLI flags to default to
--source rpkispoolsfor dated queries and made--collectoroptional.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/lens/rpki/mod.rs | Adds the new RpkiSpools source and maps it into the historical loader plumbing. |
| src/lens/rpki/commons.rs | Extends bgpkit-commons integration to parse RPKISPOOL collectors/sources and defaults historical loads to RPKISPOOL. |
| src/bin/commands/rpki.rs | Updates CLI defaults/args for dated queries and adds validation for unknown sources/collectors. |
| CHANGELOG.md | Documents the new default historical source and behavior changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
61
to
64
| /// Historical collector options | ||
| #[derive(Debug, Clone, Default, Serialize, Deserialize)] | ||
| #[cfg_attr(feature = "cli", derive(clap::ValueEnum))] | ||
| pub enum RpkiViewsCollectorOption { |
Comment on lines
+423
to
+426
| _ => Err(format!( | ||
| "Unknown historical RPKI source '{}'. Valid options: rpkispools, ripe, rpkiviews", | ||
| source | ||
| )), |
Comment on lines
+455
to
+458
| _ => Err(format!( | ||
| "Unknown historical RPKI collector '{}'. Valid options: sobornost, attn, kerfuffle; massars is only available with rpkiviews", | ||
| collector | ||
| )), |
Comment on lines
+435
to
+439
| fn test_parse_rpkispools_data_source() { | ||
| assert!(matches!( | ||
| parse_data_source("rpkispools").unwrap(), | ||
| RpkiDataSource::RpkiSpools | ||
| )); |
Comment on lines
305
to
308
| assert!(matches!( | ||
| parse_historical_source("ripe", None).unwrap(), | ||
| HistoricalRpkiSource::Ripe | ||
| )); |
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.
Summary
rpkispoolswith the Sobornost mirror the default for dated CLI queries.Validation
cargo fmt --checkcargo clippy --all-features -- -D warningscargo test --all-features— 272 passed, 1 ignored; 13 CLI unit tests; 1 CLI integration test; 9 doc tests passed.rpki aspas --date 2026-06-28 --format json: 2,208 ASPA records from RPKISPOOL/Sobornost in 17 seconds.Closes #134