From 92c9e9a07974451f1e5e3db58ed353d3c2655f1a Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Tue, 2 Nov 2021 04:11:34 -0700 Subject: [PATCH] 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. --- packages/playwright-core/src/grid/gridServer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/playwright-core/src/grid/gridServer.ts b/packages/playwright-core/src/grid/gridServer.ts index 018afc1367..7973269d6a 100644 --- a/packages/playwright-core/src/grid/gridServer.ts +++ b/packages/playwright-core/src/grid/gridServer.ts @@ -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; }