NixOS/nixos-status

'Last updated' field on status.nixos.org does not reflect expected value.

wamserma opened this issue · 6 comments

The values in the column ''Last updated' on https://status.nixos.org are computed based on the timestamp in the head commit of the channel. But due to merging it often happens that the timestamp of the head commit is much older than its parent commits, leading confused people to create issues in nixpkgs. See the commits pushed on June 8, 2020 for an example.
In the JSON info gathered through GitHubs API using comitter.date instead of commit.date would give the timestamp of the actual channel push. This would give a proper age indication on status.nixos.org.

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/why-no-release-lately/9182/5

As a workaround... the commit date is easy to get locally (should be very close to push date unless people do something "weird"), so I've been now using bash snippet:

	git fetch origin && echo "" && \
	git show --no-patch '--pretty=format:%>(12)%cr  %h %d' \
		origin/nixos-{20.09,unstable}{,-small} \
		origin/nixpkgs-{20.09-darwin,unstable} \
		| grep -vF origin/release-20.09 | grep -vF origin/master \
		| sort --ignore-leading-blanks --key=2,2 --key=1nr,1
	# grep -v: don't even show lines that match the latest *pushed* commits

	# TODO: "2 weeks" and older sort incorrectly! (hours and days are OK)
	# What stamp in --pretty?  %ci  %s

^^ re-EDITed after we dropped support for the nixpkgs-channels repo.

Preview:

  2 days ago  4a75ca4a4e7  (origin/nixos-20.09)
  2 days ago  d9dba88d08a  (origin/nixos-unstable)
23 hours ago  44c443a7a60  (origin/nixpkgs-unstable)
19 hours ago  d04a7a30979  (origin/nixpkgs-20.09-darwin, origin/nixos-20.09-small)
15 hours ago  f85194205d5  (origin/nixos-unstable-small)

@wamserma is this still the issue? As far as I can see the date is now recorded in Prometheus and that is what status.nixos.org is querying.

I'm closing the issue but please reopen it if I made wrong judgement.

I think this is fine now.

It seems that the currently shown stamp is the moment the channel got published. From my point of view, I prefer the moment when its commit was pushed (to github.com/nixos/nixpkgs).

I can recall cases when they were very far, typically when a channel is blocked. It's when I retrospectively restarted some older transient failures to advance the channel at least a little, even if the corresponding commit is a few days old already – and then status.nixos.org shows the channel as fresh even if it isn't.

Maybe my expectations aren't in majority? Anyway, I keep using my script above...

@vcunat I see no reason why not to have a new column "Last pushed". Feel free to send PR and I'll review it.