Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Change TO_DATE to tomorrow (exclusive) for both metrics #70

Closed
wants to merge 1 commit into from

Conversation

foolip
Copy link
Collaborator

@foolip foolip commented Dec 10, 2021

Fixes #63.

@foolip
Copy link
Collaborator Author

foolip commented Dec 10, 2021

@foolip
Copy link
Collaborator Author

foolip commented Dec 10, 2021

I have vetted the changes by looking at git diff origin/gh-pages origin/end-tomorrow-test-deploy and I looks good to me. The Compat 2021 scores won't change as a result of this, because even though there have been some improvements, it's not enough to cross over to the next integer. (Flooring of each area to an integer between 0-20 means that one has to pass a 5% boundary for an individual area to see a 1% improvement in the overall score.)

@gsnedders
Copy link
Contributor

Is the risk here that we change what runs we use for a given day? Like, do we currently use the first run of a given day, or the last run of a given day? IIRC, we currently go for the latter, whereas this will end up with us using the latest run at the time the script runs, right?

@foolip
Copy link
Collaborator Author

foolip commented Dec 10, 2021

@gsnedders excellent hypothesis, I didn't think of that, and it could indeed be the original reason here.

We use some URL starting with https://wpt.fyi/api/runs?aligned=true&max-count=1 and that API returns runs in the same order as https://wpt.fyi/runs, newest first. So after a day has ended, we would indeed pick the latest aligned run for that day.

Maybe this is OK, but it will result in some churn in the stats files generated here.

To avoid this, we'd need to wait until something like 3 hours after UTC midnight before trying to generate stats for the previous day. @gsnedders do you think that would be fast enough to resolve #63?

@gsnedders
Copy link
Contributor

I actually mentioned that in #63 (comment) 😜

One option is we basically regenerate this once on the day based in midday figures, then amend them the following day; another is we could just go for the first aligned build of each day (though idk if we can get that so easily via the API?).

I think the 3 hour wait was much longer because sometimes we see longer delays before the daily runs start, plus the run time sometimes various a bit (at least historically).

@foolip
Copy link
Collaborator Author

foolip commented Dec 10, 2021

Oops 😬

The maximum total delay is indeed much longer than 3 hours now, because there's a pipeline of scheduled jobs, and also the use of yesterday's date (exclusive!) should mean a 24-48 hour delay just from this step, depending on when in the day the job runs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update action missing latest runs?
2 participants