chore: update documentation on rolling chromium (#6399)

Co-authored-by: Mathias Bynens <mathias@qiwi.be>
This commit is contained in:
Johan Bay 2020-09-08 11:05:51 +02:00 committed by GitHub
parent b6bbfd0ede
commit 2470d1e9cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 12 deletions

View File

@ -269,6 +269,18 @@ See [Debugging Tips](README.md#debugging-tips) in the readme.
# For Project Maintainers # For Project Maintainers
## Rolling new Chromium version
The following steps are needed to update the Chromium version.
1. Find a suitable Chromium revision
Not all revisions have builds for all platforms, so we need to find one that does.
To do so, run `utils/check_availability.js -rb` to find the latest suitable beta Chromium revision (see `utils/check_availability.js -help` for more options).
1. Update `src/revisions.ts` with the found revision number.
1. Run `npm run ensure-correct-devtools-protocol-revision`.
If it fails, update `package.json` with the expected `devtools-protocol` version.
1. Run `npm run tsc` and `npm install` and ensure that all tests pass. If a test fails, bisect the upstream cause of the failure, and either update the test expectations accordingly (if it was an intended change) or work around the changes in Puppeteer (if its not desirable to change Puppeteers observable behavior).
## Releasing to npm ## Releasing to npm
Releasing to npm consists of the following phases: Releasing to npm consists of the following phases:

View File

@ -60,7 +60,9 @@ Usage: node check_availability.js [<options>] [<browser version(s)>]
options options
-f full mode checks availability of all the platforms, default mode -f full mode checks availability of all the platforms, default mode
-r roll mode checks for the most recent Chromium roll candidate -r roll mode checks for the most recent stable Chromium roll candidate
-rb roll mode checks for the most recent beta Chromium roll candidate
-rd roll mode checks for the most recent dev Chromium roll candidate
-h show this help -h show this help
browser version(s) browser version(s)
@ -71,8 +73,9 @@ Examples
To check Chromium availability of a certain revision To check Chromium availability of a certain revision
node check_availability.js [revision] node check_availability.js [revision]
To find a Chromium roll candidate for current Stable Linux version To find a Chromium roll candidate for current stable Linux version
node check_availability.js -r node check_availability.js -r
use -rb for beta and -rd for dev versions.
To check Chromium availability from the latest revision in a descending order To check Chromium availability from the latest revision in a descending order
node check_availability.js node check_availability.js
@ -97,7 +100,13 @@ function main() {
case 'f': case 'f':
break; break;
case 'r': case 'r':
checkRollCandidate(); checkRollCandidate('stable');
return;
case 'rb':
checkRollCandidate('beta');
return;
case 'rd':
checkRollCandidate('dev');
return; return;
default: default:
console.log(helpMessage); console.log(helpMessage);
@ -148,19 +157,18 @@ async function checkOmahaProxyAvailability() {
stopWhenAllAvailable: false, stopWhenAllAvailable: false,
}); });
} }
async function checkRollCandidate(channel) {
async function checkRollCandidate() {
const omahaResponse = await fetch( const omahaResponse = await fetch(
'https://omahaproxy.appspot.com/all.json?channel=stable&os=linux' `https://omahaproxy.appspot.com/all.json?channel=${channel}&os=linux`
); );
const stableLinuxInfo = JSON.parse(omahaResponse)[0]; const linuxInfo = JSON.parse(omahaResponse)[0];
if (!stableLinuxInfo) { if (!linuxInfo) {
console.error('no stable linux information available from omahaproxy'); console.error(`no ${channel} linux information available from omahaproxy`);
return; return;
} }
const stableLinuxRevision = parseInt( const linuxRevision = parseInt(
stableLinuxInfo.versions[0].branch_base_position, linuxInfo.versions[0].branch_base_position,
10 10
); );
const currentRevision = parseInt( const currentRevision = parseInt(
@ -169,7 +177,7 @@ async function checkRollCandidate() {
); );
checkRangeAvailability({ checkRangeAvailability({
fromRevision: stableLinuxRevision, fromRevision: linuxRevision,
toRevision: currentRevision, toRevision: currentRevision,
stopWhenAllAvailable: true, stopWhenAllAvailable: true,
}); });