chore: ignore grid version checks (#9969)

This is a preparation for docker dogfooding: since in our own repo,
we run tip-of-tree tests against stable @playwright/test, we have
different versions for Playwright and Grid.

In our case, these versions should always be close-enough, so we
can disregard safety version checks for our usecase.
This commit is contained in:
Andrey Lushnikov 2021-11-02 04:11:34 -07:00 committed by GitHub
parent d2c1922e14
commit 92c9e9a079
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -238,7 +238,7 @@ export class GridServer {
this._wsServer.on('connection', async (ws, request) => {
if (request.url?.startsWith(this._securePath('/claimWorker'))) {
const params = new URL('http://localhost/' + request.url).searchParams;
if (params.get('pwVersion') !== this._pwVersion) {
if (params.get('pwVersion') !== this._pwVersion && !process.env.PWTEST_UNSAFE_GRID_VERSION) {
ws.close(WSErrors.CLIENT_PLAYWRIGHT_VERSION_MISMATCH.code, WSErrors.CLIENT_PLAYWRIGHT_VERSION_MISMATCH.reason);
return;
}