-
Notifications
You must be signed in to change notification settings - Fork 100
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
coordinator crashes on bad logs access #648
Comments
The same issue occurs with some other commands ( ControlRequest::Logs { uuid, name, node } => {
let dataflow_uuid = if let Some(uuid) = uuid {
uuid
} else if let Some(name) = name {
resolve_name(name, &running_dataflows, &archived_dataflows)?
} else {
bail!("No UUID provided")
};
let reply = retrieve_logs(
&running_dataflows,
&archived_dataflows,
dataflow_uuid,
node.into(),
&mut daemon_connections,
clock.new_timestamp(),
)
.await
.map(ControlRequestReply::Logs);
let _ = reply_sender.send(reply);
} I don't think we should stop the coordinator if we can't resolve the dataflow UUID. I'll wrap it so it just sends an error reply instead. Now it looks like that: ControlRequest::Logs { uuid, name, node } => {
let dataflow_uuid = if let Some(uuid) = uuid {
Ok(uuid)
} else if let Some(name) = name {
resolve_name(name, &running_dataflows, &archived_dataflows)
} else {
Err(eyre!("No uuid"))
};
match dataflow_uuid {
Ok(uuid) => {
let reply = retrieve_logs(
&running_dataflows,
&archived_dataflows,
uuid,
node.into(),
&mut daemon_connections,
clock.new_timestamp(),
)
.await
.map(ControlRequestReply::Logs);
let _ = reply_sender.send(reply);
}
Err(err) => {
let _ = reply_sender.send(Err(err));
}
} And in case of bad logs name/uuid it looks like that: [ERROR]
unexpected reply to daemon logs: Error("no dataflow with name `test`") |
Yes. I agree that this should not happened. And this looks good! Could you open a PR? Thanks in advance :) |
Describe the bug
When I try to view logs using
dora logs
, the coordinator crashes if I input incorrect information (e.g., an invalid UUID or name). The same happens when there is an error, such as a wrong node ID or when multiple dataflows have the same name.Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: