-
-
Notifications
You must be signed in to change notification settings - Fork 1
ingest-router: Verify incoming project configs requests #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| use crate::auth::RelayInfo; | ||
| use locator::client::{LocatorConfig as ClientLocatorConfig, LocatorType as ClientLocatorType}; | ||
| use locator::config::{BackupRouteStore, ControlPlane, LocatorDataType}; | ||
| use serde::Deserialize; | ||
|
|
@@ -187,6 +188,8 @@ pub struct Config { | |
| /// Timeout configuration for relay handlers | ||
| #[serde(default)] | ||
| pub relay_timeouts: RelayTimeouts, | ||
| /// Trusted downstream relay public keys, keyed by relay id | ||
| pub relay_keys: HashMap<String, RelayInfo>, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The Suggested FixAdd the Prompt for AI AgentAlso affects:
|
||
| } | ||
|
|
||
| impl Config { | ||
|
|
@@ -349,6 +352,7 @@ routes: | |
| action: | ||
| handler: health | ||
| locality: us | ||
| relay_keys: | ||
| "#; | ||
|
|
||
| let config: Config = serde_yaml::from_str(yaml).unwrap(); | ||
|
|
@@ -386,6 +390,7 @@ routes: | |
| }], | ||
| )]), | ||
| relay_timeouts: RelayTimeouts::default(), | ||
| relay_keys: HashMap::new(), | ||
|
cursor[bot] marked this conversation as resolved.
|
||
| routes: vec![Route { | ||
| r#match: Match { | ||
| path: Some("/api/".to_string()), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The new
relay_keysconfig field is missing#[serde(default)], which will cause service startup to fail with existing configurations that don't have this field.Severity: CRITICAL
Suggested Fix
Add the
#[serde(default)]attribute to therelay_keysfield inconfig.rs. This will make the field optional during deserialization, allowing the service to start with older configuration files.Prompt for AI Agent
Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there aren't any existing deployments we need to maintain compatibility with