andygrove opened a new issue, #2257:
URL: https://github.com/apache/datafusion-ballista/issues/2257
## Describe the bug
The web TUI keeps its own hand-written copies of the scheduler's `/api/*`
response types, and they have drifted from what the scheduler actually serves.
`ballista-cli/src/tui/domain/jobs/stages.rs:59` declares:
```rust
pub struct StageTaskResponse {
pub id: usize,
pub status: StageTaskStatus,
pub partition_id: u32,
...
}
```
but the scheduler has served an array there since 2ed3464df
("Multi-partition tasks: partition_slice plumbing + SortShuffleWriter
refactor", #2038, 2026-07-19), which changed `TaskSummary::partition_id` from
`u32` to `Vec<u32>`. That commit touched `ballista-cli/src/main.rs` but not the
TUI's copy of the type.
The field has no `#[serde(default)]`, so deserializing `[0]` into `u32`
should fail the whole `JobStageResponse`, taking the stage detail popup with it.
A second, more benign drift in the same file: `StageTaskStatus::Failed {
reason }` vs the scheduler's `TaskStatus::Failed { reason, error }`. Serde
ignores the extra field, so this one just means the TUI cannot show the error
text.
## To Reproduce
Run a job against a current scheduler and open the stages popup for it in
the TUI.
## Expected behavior
The stage detail popup renders, showing per-task partitions.
## Additional context
This is a structural problem rather than a one-off. There are currently
three independent declarations of the same wire contract:
| TUI type (`ballista-cli/src/tui/domain/jobs*.rs`) | Scheduler type |
| --- | --- |
| `Job` | `JobResponse` |
| `JobStagesResponse` | `QueryStagesResponse` |
| `JobStageResponse` | `QueryStageSummary` |
| `StageTaskResponse` | `TaskSummary` |
| `StageTaskStatus` | `TaskStatus` |
| `TaskPercentiles` | `Percentiles` |
Nothing makes them move together, so a scheduler-side field change compiles
and ships while the TUI silently stops parsing.
The fix is for the TUI to depend on the shared wire-type crate rather than
redeclare it. #2256 extracts those types into `ballista-api-types`, a
serde-only leaf crate that a `wasm32` build can depend on. A follow-up stacked
on it deletes the TUI's copies and imports the shared types instead, so this
class of drift becomes a compile error.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]