Repository navigation
Conversation
119965b to
8ce390a
Compare
simoneves
left a comment
There was a problem hiding this comment.
Claude has lots to say
I reviewed the PR as it stands: your local playwright-ci-automation branch is at 8ce390a, the same commit as the head of PR #27, with the same three commits on top of main. The approach is sound: one Playwright runner package, run against the same disposable HeavyDB and Immerse build that Puppeteer uses, with datasets restored from S3. But I'd expect the Playwright step to fail as written. I read the code but didn't run anything, since gh isn't installed here and I can't see the CI results.
Likely to break the run
colors.ui.test.tsimports@material-ui/core, which won't be installed. The Playwright step points the repo-rootnode_modulesattest-config/playwright/node_moduleswith a symlink, and that folder only contains@playwright/test,playwrightandplaywright-core. Playwright loads every test file before it runs anything, so this missing module either fails the whole run or at least fails that file.
import { hexToRgb } from "@material-ui/core"It's only used for a colour conversion, so a small local hexToRgb helper is probably easier than adding Material UI to the runner package.
nl-to-answer.ui.test.tsneeds a working HeavyIQ language-model backend. The tests expect text like"top 5 deepest dams are"from a real natural-language answer.start-heavydb.shdoesn't configure any HeavyIQ or language-model service, and the restore only creates theheavyiqdatabase and itsworld_damstable.sql-to-answer.ui.test.tsshould be fine because it only runs plain SQL againstworld_dams. The natural-language suite probably needs atest.skipwith a reason, like the one used forparameter-url.
Workflow issues
-
Playwright never runs if Puppeteer fails. "Run Playwright test suite" has no
if:, so the default "only if earlier steps passed" applies. If both suites are meant to report on every run, useif: ${{ !cancelled() && steps.<restore-step-id>.outcome == 'success' }}. That also means giving the restore step anid. -
Changes to
playwright.config.tswon't trigger the workflow. Theon.push.pathsfilter coverssrc/**andtest-config/**, but the config file sits at the repo root. Add"playwright.config.ts"to the list. -
The time budget is tight. The job now allows 90 minutes. The steps can take up to 15 for HeavyDB startup, 30 for the restore, 44 for Puppeteer and 30 for Playwright, plus setup. A slow restore plus a slow Puppeteer run will hit the job limit partway through Playwright, which gives a confusing result. Either trim the step limits or raise the job limit.
-
Retries and parallel workers are now active, and both may hide problems. GitHub sets
CI=true, so the config's CI settings kick in: 2 retries, 3 parallel workers, and the HTML reporter. Retries can hide flaky tests. Three workers sharing one HeavyDB instance is fine for read-only tests, but watch tests that create or delete dashboards and join data sources (for exampletest-join-1). Running several copies of the same test can create naming collisions.
Smaller points
-
Use a relative import in
utils/charts.ts. Moving off theui-tests/utilsindex file is correct, because that index pulls in the Puppeteer helpers. But"ui-tests/utils/common"relies on Playwright honouring thetsconfigbaseUrl. The siblingplaywright/utils/dashboard.tsalready uses"../../utils/common", so matching that is more robust. -
Consider a conditional skip for
parameter-url. Thedescribe.skipturns this suite off for local runs against the shared server too. Something like(process.env.IMMERSE_TEST_URL ? describe.skip : describe)would keep it running locally. That's the same signalsessionization.ui.test.tsuses to detect CI. -
Naming. The workflow, job, artifacts, scripts folder and HeavyDB container are all still called "puppeteer", and so is the "Restore Puppeteer test data" step. A rename can wait for a follow-up, but it would help.
-
Deleting
playwright.ymlremoves the manual way to run Playwright against the shared test server. That workflow was already obsolete (Node 12/14 andactions/*@v3), so this is fine. Just confirm nobody still relies on it.
What looks good
- The restore script refactor (
render_restore_sql, separateheavyaiandheavyiqcommands, one cleanup of the temp files) is clean. The credentials still stay in0600temp files instead of on the command line. - The new schema checks for the hurricane and dams tables match the columns the tests actually query.
- Pinning
@playwright/testat1.61.1matches the rootpackage-lock.json, so local and CI runs use the same browser build. - Letting
playwright install --with-depsinstall the operating-system libraries for both browsers removes the earliersudocall from the Puppeteer install. Checking that Chrome launches still happens afterwards. - The
us_states→us_states_geofix injoins-crossfilterlines up with the restored table and itsSTUSPSjoin key.
I'd fix the first four before merging. The rest can be follow-ups.
💬 Description
Mostly opening just to test new puppeteer copy-pr-bot stuff