Add checkpoint info to /stats API endpoint, add checkpoint info UI#6003
Add checkpoint info to /stats API endpoint, add checkpoint info UI#6003Karakatiza666 wants to merge 3 commits intomainfrom
Conversation
mythical-fred
left a comment
There was a problem hiding this comment.
Two design questions, see inline.
|
|
||
| /// Converts epoch milliseconds to a `DateTime<Utc>`, falling back to | ||
| /// `Utc::now()` if the value is 0 or invalid. | ||
| fn epoch_ms_to_datetime(epoch_ms: i64) -> DateTime<Utc> { |
There was a problem hiding this comment.
If epoch_ms is 0/invalid, returning Utc::now() will make the UI show a fresh timestamp even when we don’t actually know the start time. Consider returning an Option (and omitting the field) or a sentinel so the UI can show "unknown" instead of a misleading "just now".
There was a problem hiding this comment.
The epoch_ms should not happen at runtime; updated the comments and the code to reflect that. Since this is a hard rule I opted for an explicit crash if this occurs, LMK if you think it's better to bubble it up as an error
crates/adapters/src/controller.rs
Outdated
| let epoch_ms = self.checkpoint_started_epoch_ms(); | ||
| let started_at = epoch_ms_to_datetime(epoch_ms); | ||
| CheckpointActivity::InProgress { | ||
| sequence_number: 0, |
There was a problem hiding this comment.
sequence_number: 0 looks like a placeholder. If we can’t plumb the real seq here, consider making this field optional or dropping it from CheckpointActivity::InProgress for now to avoid exposing bogus data.
There was a problem hiding this comment.
Dropped sequence_number because it is not available in all cases, and we don't have a business case to display it for an in-progress checkpoint anyway
|
please engage with anna for the UX |
|
Some feedback on UI:
|
Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
…timestamp Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
9f168a8 to
301b664
Compare
Signed-off-by: feldera-bot <feldera-bot@feldera.com>
Testing:
Tested the UI using the mock API value simulator. Did not test the adapters and pipeline-manager changes