Skip to content

ci: Add workflow to bump the project template's Playwright version#2003

Open
Pijukatel wants to merge 4 commits into
masterfrom
claude/playwright-version-bumping-qmwjk5
Open

ci: Add workflow to bump the project template's Playwright version#2003
Pijukatel wants to merge 4 commits into
masterfrom
claude/playwright-version-bumping-qmwjk5

Conversation

@Pijukatel

@Pijukatel Pijukatel commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Description

The cookiecutter project template's Dockerfile
(src/crawlee/project_template/{{cookiecutter.project_name}}/Dockerfile) pins a single
Playwright version. That value selects the Apify base image tag
(apify/actor-python-playwright*:3.13-<version>) and the in-image playwright==<version>
pin, and it was bumped by hand. This adds automation that keeps it current, in the same
spirit as the template docker-image bumping in apify/actor-templates.

What: the cookiecutter project template's Dockerfile pins a single Playwright
version that selects the Apify base image tag and the in-image playwright pin.
It was bumped by hand. This adds a scheduled workflow that keeps it current.

How: a daily workflow (plus manual dispatch) runs a stdlib-only helper that
reads the Apify Playwright base image's Docker Hub tags, picks the highest
stable version, and rewrites only the pinned-version line when a newer one is
available. On a change it commits to a fixed branch and opens (or refreshes) an
auto-merge pull request, reusing the repo's existing signed-commit and gh pr
automation. This mirrors the template docker-image bumping used in
apify/actor-templates, adding the daily self-detection it does not need there.

Alternatives considered: keying off PyPI's latest playwright or the resolved
lockfile version instead of the base-image tags. Both were rejected because the
template references the Apify base image, so a version is only safe to pin once
that image is published; the base image can lag PyPI and the lockfile tracks the
pip pin rather than the image.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YT79F2ENym57Q4YXh2wRBy
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.33%. Comparing base (917b6b6) to head (2c583f8).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2003      +/-   ##
==========================================
- Coverage   93.37%   93.33%   -0.05%     
==========================================
  Files         179      179              
  Lines       12482    12482              
==========================================
- Hits        11655    11650       -5     
- Misses        827      832       +5     
Flag Coverage Δ
unit 93.33% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

claude added 2 commits July 1, 2026 12:56
Drop the argument parser and make the updater a single-purpose script that runs
with no arguments and hardcodes the one Dockerfile it maintains. The workflow now
detects whether anything changed with a plain git diff instead of consuming step
outputs, removing the machinery that carried version values between steps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YT79F2ENym57Q4YXh2wRBy
Keep the updater next to the Dockerfile it maintains, under
src/crawlee/project_template/, and resolve the Dockerfile path relative to the
script instead of the repository root. The workflow invokes it from its new
location.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YT79F2ENym57Q4YXh2wRBy
@Pijukatel Pijukatel changed the title ci: add daily workflow to bump the project template's Playwright version ci: Add workflow to bump the project template's Playwright version Jul 1, 2026
@Pijukatel Pijukatel requested a review from Copilot July 1, 2026 13:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an automated mechanism to keep the cookiecutter project template’s pinned Playwright version aligned with the latest stable Apify Playwright base image tag for the template’s existing Python version.

Changes:

  • Introduces a Python script that reads the template Dockerfile, discovers the latest stable <python>-<semver> Docker Hub tag for apify/actor-python-playwright*, and updates the pinned playwright_version when newer.
  • Adds a scheduled/manual GitHub Actions workflow that runs the script daily and opens/updates an auto-merge PR when a bump is needed.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/crawlee/project_template/update_playwright_version.py Implements tag discovery + Dockerfile rewrite logic for bumping the pinned Playwright version in the template.
.github/workflows/update_playwright_version.yaml Schedules and automates running the bump script, committing changes, and creating/updating an auto-merge PR.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/crawlee/project_template/update_playwright_version.py
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Pijukatel Pijukatel requested a review from vdusek July 1, 2026 13:20
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.

4 participants