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
Add non-bogus completion times to GitHub checks #289
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, waiting for checks
CheckRunOptions { | ||
name: "nix-build -A bar -A foo --argstr system x86_64-linux".to_string(), | ||
actions: None, | ||
started_at: None, | ||
completed_at: Some("2018-01-01T01:01:01Z".to_string()), | ||
completed_at: Some("2018-04-20T13:37:42Z".to_string()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
@@ -138,7 +139,7 @@ fn result_to_check(result: &LegacyBuildResult) -> CheckRunOptions { | |||
result.system | |||
), | |||
actions: None, | |||
completed_at: Some("2018-01-01T01:01:01Z".to_string()), | |||
completed_at: Some(timestamp.to_rfc3339()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems chrono isn't emitting Z
but instead completed_at: Some("2018-04-20T13:37:42+00:00")
and thus each of these tests are failing. We'd need to use (and probably should?) https://docs.rs/chrono/0.4.6/chrono/struct.DateTime.html#method.to_rfc3339_opts with use_z set to True for it to retain the same format, like this:
assert_eq!(dt.to_rfc3339_opts(SecondsFormat::Secs, true),
"2018-01-26T18:30:09Z");
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note I specifically prefer using the Z
format and not changing the output format, since we know that specific format works and not changing the output here makes it a much safer change. Despite iso8601 being a "standard" who knows how much of it they follow.
This should eventually be replaced with completion times from the builders, but they don't currently provide that information
Nice! Thank you! |
This should eventually be replaced with completion times from the builders, but they don't currently provide that information, so local time will have to do.