jepsen-io / jepsen

A framework for distributed systems verification, with fault injection
6.78k stars 714 forks source link

WIP: Web: fix datetime parsing so fresh test runs correctly appear #538

Closed 24twelve closed 2 years ago

24twelve commented 2 years ago

Hi.

I live in UTC+5:00 timezone. I've been learning to use Jepsen, when I encountered bug: my fresh test runs would not appear in Jepsen UI.

Screenshot_846

I've tried to fix this. The idea is to always operate UTC datetime inside the application and convert to local time only for user output. I've built it locally and it works for me:

Screenshot_845

Could you have a look on this PR? I am totally not familiar with clojure and any changes would be welcome.

aphyr commented 2 years ago

Ha! That's neat! The timezone math in Jepsen is a total hack, largely there by accident, and I've been meaning to do something just like this. On the other hand, I'm a little worried by the fact that the rendered times in the web view here seem off by an hour... Does that seem right to you?

aphyr commented 2 years ago

I'm also sort of confused by the fact that some test runs aren't showing at all in your initial report--why are we getting any kind of truncation behavior in the first place? Surely they're parsable...

24twelve commented 2 years ago

why are we getting any kind of truncation behavior in the first place That is the point. If I run tests, I cannot see them in web afterwards. This is what I tried to fix. I believe that the problem is somewhere here. But currently I got stuck.

I will return to this issue later if I find time.

aphyr commented 2 years ago

Ah, no, that'd do it! I think what we really need there is a far-future time. Infinite would be ideal, but an easy hack would be to add, I dunno, a thousand years to the present. ;-)

24twelve commented 2 years ago

Actually, proposed solution does break something: if I click on any link in test row, web returns 404 not found. Please, do not merge until I resolve this :)

24twelve commented 2 years ago

After some digging, I realized, that problem is fixed and does not repoduce in Jepsen v0.2.7. Sorry for stealing your attention.