Skip to content

Commit

Permalink
Show job failure message on preview page
Browse files Browse the repository at this point in the history
The existing error message is misleading because the Errors tab only
shows user errors, not compilation errors.
  • Loading branch information
jbeisen committed Nov 28, 2023
1 parent 9b1c17a commit 7e19799
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions arroyo-console/src/routes/pipelines/CreatePipeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ export function CreatePipeline() {
} else {
errorsTab = (
<TabPanel overflowX="auto" height="100%" position="relative">
<Text>Compilation and job errors will appear here.</Text>
<Text>Job errors will appear here.</Text>
</TabPanel>
);
}
Expand Down Expand Up @@ -608,7 +608,7 @@ export function CreatePipeline() {
} else if (udfValidationApiError) {
errorMessage = formatError(udfValidationApiError);
} else if (job?.state == 'Failed') {
errorMessage = 'Job failed. See "Errors" tab for more details.';
errorMessage = job.failureMessage ?? 'Job failed.';
} else {
errorMessage = '';
}
Expand Down
2 changes: 1 addition & 1 deletion arroyo-controller/src/states/compiling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl State for Compiling {
});
loop {
tokio::select! {
val = &mut rx => match val.map_err(|err| fatal("could not compile", err.into()))? {
val = &mut rx => match val.map_err(|err| fatal("Could not compile", err.into()))? {
Ok(res) => {
ctx.status.pipeline_path = Some(res.pipeline_path);
ctx.status.wasm_path = Some(res.wasm_path);
Expand Down
2 changes: 1 addition & 1 deletion arroyo-controller/src/states/running.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl State for Running {
error!(message = "error while running", error = format!("{:?}", err), job_id = ctx.config.id);
if ctx.status.restarts >= RESTARTS_ALLOWED as i32 {
return Err(fatal(
"too many job failures",
"Job has restarted too many times",
err
));
}
Expand Down
2 changes: 1 addition & 1 deletion arroyo-controller/src/states/scheduling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ impl Scheduling {
);
if start.elapsed() > STARTUP_TIME {
return Err(fatal(
"could not get enough slots",
"Not enough slots to schedule job",
anyhow!("scheduler error -- needed {} slots", slots_needed),
));
}
Expand Down

0 comments on commit 7e19799

Please sign in to comment.