Skip to content

Commit

Permalink
fix(manager/electron): replace turned down OmahaProxy with ChromiumDa…
Browse files Browse the repository at this point in the history
…sh (Jigsaw-Code#1462)

* fix(server_manager): replace turned down omahaproxy.appspot.com

* Update engine.

* Fix type.

* Yes we get it. A string is not an int.

* Put the comment back. It's quite useful.
  • Loading branch information
sbruens committed Dec 11, 2023
1 parent 4c14a15 commit b878904
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
"typescript": "^4"
},
"engines": {
"node": "^18.16.0",
"npm": "^9.5.1"
"node": "18.x.x"
},
"scripts": {
"action": "bash ./scripts/run_action.sh",
Expand Down
10 changes: 6 additions & 4 deletions src/server_manager/electron_and_karma_chromium.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,18 @@ import {config} from './package.json';

describe('Karma', () => {
it('uses the correct Chromium version', async (done) => {
// Omaha Proxy is a service maintained by the Chrome team which serves metadata about current
// ChromiumDash is a service maintained by the Chrome team which serves metadata about current
// and legacy Chrome versions.
const electronChromiumVersionInfo = <{chromium_base_position?: string}>(
const electronChromiumVersionInfo = <{chromium_main_branch_position?: number}>(
await (
await fetch(
`http://omahaproxy.appspot.com/deps.json?version=${electronToChromium(electronVersion)}`
`https://chromiumdash.appspot.com/fetch_version?version=${electronToChromium(
electronVersion
)}`
)
).json()
);
const electronChromeRevision = electronChromiumVersionInfo.chromium_base_position;
const electronChromeRevision = electronChromiumVersionInfo.chromium_main_branch_position;
expect(electronChromeRevision).toEqual(config.PUPPETEER_CHROMIUM_REVISION);
done();
});
Expand Down
4 changes: 2 additions & 2 deletions src/server_manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@
"PUPPETEER_CHROMIUM_REVISION": [
"The Chromium revision number used by Karma. This should always be the revision number of",
"the bundled Chromium in our version of Electron. Whenever upgrading Electron, run the",
"server_manager tests. You'll get a failure that looks like <Expected '812852' to equal '693954>.",
"server_manager tests. You'll get a failure that looks like <Expected 812852 to equal 693954>.",
"Set PUPPETEER_CHROMIUM_REVISION to the first of those numbers to get the correct revision",
"and `npm ci` to re-install puppeteer, causing it to download the new",
"Chromium version."
]
}
},
"config": {
"PUPPETEER_CHROMIUM_REVISION": "992738"
"PUPPETEER_CHROMIUM_REVISION": 992738
},
"devDependencies": {
"@types/node": "^16.11.29",
Expand Down

0 comments on commit b878904

Please sign in to comment.