Skip to content
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

Merged
merged 1 commit into from Dec 10, 2018

Conversation

edef1c
Copy link
Member

@edef1c edef1c commented Dec 10, 2018

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.

Copy link
Member

@grahamc grahamc left a 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()),
Copy link
Member

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()),
Copy link
Member

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");

Copy link
Member

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
@grahamc grahamc merged commit a42dc30 into NixOS:released Dec 10, 2018
@grahamc
Copy link
Member

grahamc commented Dec 10, 2018

Nice! Thank you!

@edef1c edef1c deleted the completed-at branch December 10, 2018 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants