-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
tests(devtools): dynamically fetch chromium version #12232
Conversation
const commitMessage = JSON.parse(latestCommit).commit.message; | ||
const commitPosition = /Cr-Commit-Position: refs\/heads\/master@\{#([0-9]+)\}/.exec(commitMessage)[1]; | ||
|
||
return commitPosition; |
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.
we could do something like return commitPosition - commitPosition % 1000;
or something if we still want this to only update periodically
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.
we could do something like return commitPosition - commitPosition % 1000; or something if we still want this to only update periodically
This seems unnecessary for now unless anyone really thinks they want it. This is often a few seconds even with a download and unzip
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.
This is often a few seconds ...
Not if you're on bad wifi like I currently am :)
what's the ~time delta for 1000 revisions?
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.
what's the ~time delta for 1000 revisions?
there's about 420 revisions per weekday.
🕶️
d13bc75
to
e2487dc
Compare
@@ -18,6 +18,7 @@ const MAX_CONTENT_SHELLS = 10; | |||
const PLATFORM = getPlatform(); | |||
const LH_ROOT = `${__dirname}/../..`; | |||
const CACHE_PATH = path.resolve(LH_ROOT, '.tmp', 'chromium-web-tests', 'content-shells'); | |||
const COMMIT_POSITION_UPDATE_PERIOD = 420; |
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.
nice
Use the github API to fetch the latest commit message from the Chromium mirror.
There's not really any way to get commit info from a remote git repo without cloning, and the Github API seems more likely to be stable long-term than any feed on
googlesource.com
.We may have to update the branch name to
main
in the github API url when thechromium/src
migration occurs: https://groups.google.com/a/chromium.org/g/infra-announce/c/-uMWoep7RNA