Skip to content
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

[BGS-146] [messages] rover stderr should emit successfully updated router config after valid edit when --router-config is passed. #2341

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/command/dev/next/router/hot_reload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ use crate::{subtask::SubtaskHandleStream, utils::effect::write_file::WriteFile};

use super::config::RouterConfig;

use rover_std::{debugln, errln, infoln};

pub enum RouterUpdateEvent {
SchemaChanged { schema: String },
ConfigChanged { config: RouterConfig },
Expand Down Expand Up @@ -69,12 +71,17 @@ where
let _ = sender.send(message).tap_err(|err| {
tracing::error!("Unable to send message. Error: {:?}", err)
});
infoln!("Router config updated.");
debugln!("{}", config.inner());
}
Err(err) => {
let error_message =
format!("Router config failed to update. {}", &err);
let message = HotReloadEvent::ConfigWritten(Err(Box::new(err)));
let _ = sender.send(message).tap_err(|err| {
tracing::error!("Unable to send message. Error: {:?}", err)
});
errln!("{}", error_message);
}
}
}
Expand Down
Loading