Skip to content

fix: migrate up-check from Puppeteer to Playwright#39

Open
adrianschmidt-bot wants to merge 2 commits intodevfrom
fix/up-check-esm
Open

fix: migrate up-check from Puppeteer to Playwright#39
adrianschmidt-bot wants to merge 2 commits intodevfrom
fix/up-check-esm

Conversation

@adrianschmidt-bot
Copy link
Collaborator

@adrianschmidt-bot adrianschmidt-bot commented Mar 2, 2026

The v2 migration added "type": "module" to package.json, which broke the CommonJS check script (ReferenceError: require is not defined in ES module scope).

Instead of working around it, this migrates to Playwright which is already a project dependency.

Changes:

  • Replace Puppeteer with Playwright in the check script
  • Use the shared set-up-node action and npm ci instead of ad-hoc Puppeteer install
  • Install only the chromium browser needed for the check

Summary by CodeRabbit

  • Chores
    • Upgraded website health check infrastructure and browser automation tooling for improved reliability.
    • Enhanced error detection and recovery mechanisms in validation workflows.
    • Increased retry thresholds in health check validations to improve consistency.
    • Streamlined CI/CD dependency installation and environment setup process.

@coderabbitai
Copy link

coderabbitai bot commented Mar 2, 2026

Warning

Rate limit exceeded

@adrianschmidt-bot has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 7 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 194d2f7 and 7cdb2c0.

📒 Files selected for processing (2)
  • .github/workflows/check-website.js
  • .github/workflows/up-check.yml
📝 Walkthrough

Walkthrough

The pull request migrates website checking automation from Puppeteer to Playwright. Changes include updating the browser automation library in the workflow script, refactoring from IIFE to top-level async/await, and modifying the GitHub Actions workflow configuration to install Playwright dependencies instead of Puppeteer.

Changes

Cohort / File(s) Summary
Website Check Script
.github/workflows/check-website.js
Migrated from Puppeteer to Playwright for browser automation. Refactored code structure from IIFE to top-level async with try/catch/finally. Updated navigation to use networkidle instead of networkidle0, replaced waitForSelector with locator-based approach, and improved error handling with explicit browser cleanup in finally block.
Workflow Configuration
.github/workflows/up-check.yml
Replaced setup-node action with custom action path, removed Puppeteer installation in favor of npm ci and Playwright chromium installation. Removed GITHUB_TOKEN environment exposure from the Check Website Content step and increased curl healthcheck retry count from 3 to 5.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: migrating the up-check workflow from Puppeteer to Playwright, which is the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

The v2 migration added "type": "module" to package.json, which broke
the CommonJS check script. Instead of working around it, migrate to
Playwright which is already a project dependency.

- Replace Puppeteer with Playwright in the check script
- Use the shared set-up-node action and npm ci instead of ad-hoc install
- Install only the chromium browser needed for the check
run: npm ci

- name: Install Playwright browser
run: npx playwright install --with-deps chromium
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to cache this, right?

@adrianschmidt-bot
Copy link
Collaborator Author

Good call! Added caching for the Playwright browser binaries (~/.cache/ms-playwright). On cache hit it skips the browser download and only installs system deps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants