Skip to content

fix(ci): dispatch camoufox template updates with camoufox's own Playwright version - #308

Merged
l2ysho merged 3 commits into
masterfrom
fix/camoufox-template-dispatch-version
Sep 9, 2026
Merged

fix(ci): dispatch camoufox template updates with camoufox's own Playwright version#308
l2ysho merged 3 commits into
masterfrom
fix/camoufox-template-dispatch-version

Conversation

@l2ysho

@l2ysho l2ysho commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Note

TL;DR In actor-templates we are getting updates to non-existing camoufox images, this is a proposal for fix.

The defect

src/matrices/node/playwright.ts knows camoufox is special, and handles it carefully:

const imagePlaywrightVersions = isCamoufoxImage ? camoufoxPlaywrightVersions : latestFivePlaywrightVersions;
const latestImagePlaywrightVersion = isCamoufoxImage ? latestCamoufoxPlaywrightVersion : latestPlaywrightVersion;

The range is read from package metadata rather than pinned, and the image is dropped from the matrix entirely if it cannot be resolved — as src/shared/camoufox.ts puts it, publishing a known-broken image is worse than publishing none.

Then the dispatch discards all of it:

await setParametersForTriggeringUpdateWorkflowOnActorTemplates('node', latestPlaywrightVersion);

latestPlaywrightVersion is the global latest. It becomes latest-module-version, which the workflow sends with a hardcoded five-image list, camoufox included.

What it costs

camoufox-js@0.12.0 declares:

"peerDependencies": { "playwright-core": "<1.61.0" }

So the images diverge, correctly:

apify/actor-node-playwright-chrome     newest Node 24 tag:  24-1.63.0
apify/actor-node-playwright-camoufox   newest Node 24 tag:  24-1.60.0

The dispatch claims 1.63.0 for both. apify/actor-templates#872 is what that produces — it pins apify/actor-node-playwright-camoufox:24-1.61.1, Docker Hub returns 404 for that tag, and both Test Docker builds jobs fail while the other 53 checks pass. That PR cannot go green as written.

The fix

Split the dispatch. The four regular images keep the existing version; camoufox gets its own, carrying latestCamoufoxPlaywrightVersion.

The camoufox step is skipped when the matrix resolved no supported version — the same condition under which no camoufox image is built, so the dispatch and the build stay in agreement.

The Python playwright workflow has the identical defect and gets the identical fix. It is harmless today by coincidence (camoufox==0.5.6 supports <1.63 and the latest Python Playwright is 1.62.0, so the two versions match) but it breaks as soon as 1.63 reaches the Python images.

Verification

Both matrix scripts run with GITHUB_OUTPUT set to a temp file:

node:playwright     latest-runtime-version=24
                    latest-module-version=1.63.0
                    latest-camoufox-module-version=1.60.0

python:playwright   latest-runtime-version=3.14
                    latest-module-version=1.62.0
                    latest-camoufox-module-version=1.62.0

1.60.0 is exactly the newest camoufox tag on Docker Hub, and the node log line confirms the reasoning:

Playwright versions for camoufox (camoufox-js@0.12.0 supports <1.61.0) [ '1.58.1', '1.58.2', '1.59.0', '1.59.1', '1.60.0' ]

Regression check on the matrices with no camoufox image — node:normal emits only latest-runtime-version, node:puppeteer only that plus latest-module-version. Both unchanged.

yarn typecheck clean, yarn test 23/23 pass, yarn fmt reports no changes.

Knock-on effects

Removing camoufox from the main image list changes the branch name actor-templates derives from it, so the existing ci/apify/actor-node-playwright_..._camoufox branch is orphaned. #872 should be closed; the next dispatch opens two PRs in its place, one per image group.

This also depends on apify/actor-templates#926, which fixes a separate crash in the receiving workflow. Until that merges, actor-templates cannot act on either dispatch.

Not addressed

Why camoufox-js caps at <1.61.0 is upstream and out of scope. actor-templates also still writes whatever tag it is told without checking it resolves — worth a guard there, but this PR removes the reason it currently gets told the wrong one.

🤖 Generated with Claude Code

…right version

The matrix already knows camoufox cannot use every Playwright release. It reads
the supported range from the package metadata and builds the camoufox image
with its own version list:

    const imagePlaywrightVersions = isCamoufoxImage ? camoufoxPlaywrightVersions : latestFivePlaywrightVersions;

The dispatch to actor-templates then ignores that. It sends
`latestPlaywrightVersion` - the global latest - alongside a hardcoded image list
that includes camoufox. actor-templates writes that version into the camoufox
Dockerfiles, producing a `FROM` tag that was never built.

Today camoufox-js@0.12.0 declares `playwright-core: "<1.61.0"`, so the newest
camoufox image is 24-1.60.0 while the other images are at 24-1.63.0. The
dispatch claims 1.63.0 for all five. apify/actor-templates#872 is the result:
it pins apify/actor-node-playwright-camoufox:24-1.61.1, which does not exist on
Docker Hub, and its Docker build jobs fail.

Split the dispatch in two. The four regular images keep the existing version;
camoufox gets its own dispatch carrying `latestCamoufoxPlaywrightVersion`, which
was already computed one line away. The camoufox step is skipped when the matrix
resolved no supported version - the same condition under which no camoufox image
is built.

The Python playwright workflow had the identical defect and gets the same fix.
It happens to be harmless right now (camoufox==0.5.6 supports <1.63, and the
latest Python Playwright is 1.62.0, so both versions coincide) but it would
break the moment Playwright 1.63 reaches the Python images.

Verified by running both matrix scripts with GITHUB_OUTPUT set:

    node:playwright     latest-module-version=1.63.0
                        latest-camoufox-module-version=1.60.0
    python:playwright   latest-module-version=1.62.0
                        latest-camoufox-module-version=1.62.0

1.60.0 matches the newest camoufox tag actually on Docker Hub. Matrices with no
camoufox image (node:normal, node:puppeteer) emit no camoufox output, unchanged.
Typecheck clean, 23 tests pass, biome reports no formatting changes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions github-actions Bot added this to the 149th sprint - Tooling team milestone Sep 8, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

📦 Image size report

Built images compared against the currently published rolling tag for the same runtime version (e.g. apify/actor-node:22; -slim variants against the -slim tag). Sizes are the uncompressed on-disk size reported by docker image inspect, so they will be larger than the compressed download size shown on Docker Hub. Only workflows triggered by this PR's changes report a section.

Python basic images — 5 images (at 8220d9d)
Image Variant Current New Δ
apify/actor-python:3.10 226.5 MiB 234.4 MiB 🔺 +7.8 MiB (+3.5%)
apify/actor-python:3.11 231.7 MiB 239.5 MiB 🔺 +7.8 MiB (+3.4%)
apify/actor-python:3.12 226.6 MiB 234.4 MiB 🔺 +7.8 MiB (+3.5%)
apify/actor-python:3.13 215.3 MiB 223.1 MiB 🔺 +7.8 MiB (+3.6%)
apify/actor-python:3.14 217.0 MiB 224.8 MiB 🔺 +7.8 MiB (+3.6%)
Node basic images — 6 images (at 8220d9d)
Image Variant Current New Δ
apify/actor-node:22 510.6 MiB 510.8 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node:22-slim slim 159.0 MiB 159.0 MiB 🔻 −0.0 MiB (−0.0%)
apify/actor-node:24 513.3 MiB 513.5 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node:24-slim slim 161.8 MiB 161.8 MiB 🔺 +0.0 MiB (+0.0%)
apify/actor-node:26 523.9 MiB 524.1 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node:26-slim slim 172.4 MiB 172.4 MiB 🔺 +0.0 MiB (+0.0%)
Python + Selenium images — 5 images (at 8220d9d)
Image Variant Current New Δ
apify/actor-python-selenium:3.10 selenium 4.48.0 1147.6 MiB 1158.4 MiB 🔺 +10.8 MiB (+0.9%)
apify/actor-python-selenium:3.11 selenium 4.48.0 1156.8 MiB 1167.7 MiB 🔺 +10.9 MiB (+0.9%)
apify/actor-python-selenium:3.12 selenium 4.48.0 1150.4 MiB 1161.3 MiB 🔺 +10.9 MiB (+0.9%)
apify/actor-python-selenium:3.13 selenium 4.48.0 1139.2 MiB 1150.1 MiB 🔺 +10.9 MiB (+1.0%)
apify/actor-python-selenium:3.14 selenium 4.48.0 1142.2 MiB 1153.0 MiB 🔺 +10.9 MiB (+1.0%)
Node + Puppeteer images — 6 images (at 8220d9d)
Image Variant Current New Δ
apify/actor-node-puppeteer-chrome:22 puppeteer 25.10.0 2153.8 MiB 2154.0 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node-puppeteer-chrome:22-slim puppeteer 25.10.0, slim 1806.7 MiB 1806.7 MiB 🔺 +0.0 MiB (+0.0%)
apify/actor-node-puppeteer-chrome:24 puppeteer 25.10.0 2156.2 MiB 2156.3 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node-puppeteer-chrome:24-slim puppeteer 25.10.0, slim 1809.1 MiB 1809.1 MiB 🔺 +0.0 MiB (+0.0%)
apify/actor-node-puppeteer-chrome:26 puppeteer 25.10.0 2171.2 MiB 2171.4 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node-puppeteer-chrome:26-slim puppeteer 25.10.0, slim 1824.2 MiB 1824.2 MiB 🔺 +0.0 MiB (+0.0%)
Python + Playwright images — 25 images (at 8220d9d)
Image Variant Current New Δ
apify/actor-python-playwright-camoufox:3.10 playwright 1.62.0, camoufox 0.5.6 2257.9 MiB 2257.9 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-camoufox:3.11 playwright 1.62.0, camoufox 0.5.6 2270.1 MiB 2270.1 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-camoufox:3.12 playwright 1.62.0, camoufox 0.5.6 2261.5 MiB 2261.5 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-camoufox:3.13 playwright 1.62.0, camoufox 0.5.6 2249.8 MiB 2249.8 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-camoufox:3.14 playwright 1.62.0, camoufox 0.5.6 2254.2 MiB 2254.2 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-chrome:3.10 playwright 1.62.0, camoufox 0.5.6 1846.8 MiB 1846.8 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-chrome:3.11 playwright 1.62.0, camoufox 0.5.6 1853.0 MiB 1853.0 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-chrome:3.12 playwright 1.62.0, camoufox 0.5.6 1847.7 MiB 1847.7 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-chrome:3.13 playwright 1.62.0, camoufox 0.5.6 1836.2 MiB 1836.2 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-chrome:3.14 playwright 1.62.0, camoufox 0.5.6 1838.5 MiB 1838.5 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-firefox:3.10 playwright 1.62.0, camoufox 0.5.6 1163.2 MiB 1163.2 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-firefox:3.11 playwright 1.62.0, camoufox 0.5.6 1169.3 MiB 1169.3 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-firefox:3.12 playwright 1.62.0, camoufox 0.5.6 1164.0 MiB 1164.0 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-firefox:3.13 playwright 1.62.0, camoufox 0.5.6 1152.6 MiB 1152.6 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-firefox:3.14 playwright 1.62.0, camoufox 0.5.6 1154.9 MiB 1154.9 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-webkit:3.10 playwright 1.62.0, camoufox 0.5.6 1425.5 MiB 1425.5 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-webkit:3.11 playwright 1.62.0, camoufox 0.5.6 1431.6 MiB 1431.6 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-webkit:3.12 playwright 1.62.0, camoufox 0.5.6 1426.3 MiB 1426.3 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-webkit:3.13 playwright 1.62.0, camoufox 0.5.6 1414.9 MiB 1414.9 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright-webkit:3.14 playwright 1.62.0, camoufox 0.5.6 1417.2 MiB 1417.2 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright:3.10 playwright 1.62.0, camoufox 0.5.6 2828.2 MiB 2828.2 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright:3.11 playwright 1.62.0, camoufox 0.5.6 2834.3 MiB 2834.3 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright:3.12 playwright 1.62.0, camoufox 0.5.6 2829.0 MiB 2829.0 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright:3.13 playwright 1.62.0, camoufox 0.5.6 2817.5 MiB 2817.5 MiB ➖ 0.0 MiB (0.0%)
apify/actor-python-playwright:3.14 playwright 1.62.0, camoufox 0.5.6 2819.9 MiB 2819.9 MiB ➖ 0.0 MiB (0.0%)
Node + Playwright images — 30 images (at 8220d9d)
Image Variant Current New Δ
apify/actor-node-playwright-camoufox:22 playwright 1.60.0, camoufox ^0.12.0 2545.1 MiB 2545.1 MiB 🔺 +0.0 MiB (+0.0%)
apify/actor-node-playwright-camoufox:22-slim playwright 1.60.0, camoufox ^0.12.0, slim 2226.8 MiB 2226.8 MiB 🔺 +0.0 MiB (+0.0%)
apify/actor-node-playwright-camoufox:24 playwright 1.60.0, camoufox ^0.12.0 2548.4 MiB 2548.6 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node-playwright-camoufox:24-slim playwright 1.60.0, camoufox ^0.12.0, slim 2229.1 MiB 2229.1 MiB ➖ 0.0 MiB (0.0%)
apify/actor-node-playwright-camoufox:26 playwright 1.60.0, camoufox ^0.12.0 2563.5 MiB 2563.7 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node-playwright-camoufox:26-slim playwright 1.60.0, camoufox ^0.12.0, slim 2244.2 MiB 2244.2 MiB 🔺 +0.0 MiB (+0.0%)
apify/actor-node-playwright-chrome:22 playwright 1.63.0, camoufox ^0.12.0 2203.9 MiB 2204.0 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node-playwright-chrome:22-slim playwright 1.63.0, camoufox ^0.12.0, slim 1852.3 MiB 1852.3 MiB 🔻 −0.0 MiB (−0.0%)
apify/actor-node-playwright-chrome:24 playwright 1.63.0, camoufox ^0.12.0 2206.3 MiB 2206.4 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node-playwright-chrome:24-slim playwright 1.63.0, camoufox ^0.12.0, slim 1854.7 MiB 1854.7 MiB 🔺 +0.0 MiB (+0.0%)
apify/actor-node-playwright-chrome:26 playwright 1.63.0, camoufox ^0.12.0 2221.4 MiB 2221.5 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node-playwright-chrome:26-slim playwright 1.63.0, camoufox ^0.12.0, slim 1869.8 MiB 1869.8 MiB ➖ 0.0 MiB (0.0%)
apify/actor-node-playwright-firefox:22 playwright 1.63.0, camoufox ^0.12.0 1521.7 MiB 1521.9 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node-playwright-firefox:22-slim playwright 1.63.0, camoufox ^0.12.0, slim 1170.1 MiB 1170.1 MiB 🔻 −0.0 MiB (−0.0%)
apify/actor-node-playwright-firefox:24 playwright 1.63.0, camoufox ^0.12.0 1524.1 MiB 1524.2 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node-playwright-firefox:24-slim playwright 1.63.0, camoufox ^0.12.0, slim 1172.5 MiB 1172.5 MiB 🔺 +0.0 MiB (+0.0%)
apify/actor-node-playwright-firefox:26 playwright 1.63.0, camoufox ^0.12.0 1539.2 MiB 1539.3 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node-playwright-firefox:26-slim playwright 1.63.0, camoufox ^0.12.0, slim 1187.6 MiB 1187.6 MiB 🔺 +0.0 MiB (+0.0%)
apify/actor-node-playwright-webkit:22 playwright 1.63.0, camoufox ^0.12.0 1778.6 MiB 1778.8 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node-playwright-webkit:22-slim playwright 1.63.0, camoufox ^0.12.0, slim 1427.1 MiB 1427.1 MiB 🔻 −0.0 MiB (−0.0%)
apify/actor-node-playwright-webkit:24 playwright 1.63.0, camoufox ^0.12.0 1781.0 MiB 1781.2 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node-playwright-webkit:24-slim playwright 1.63.0, camoufox ^0.12.0, slim 1429.4 MiB 1429.4 MiB 🔻 −0.0 MiB (−0.0%)
apify/actor-node-playwright-webkit:26 playwright 1.63.0, camoufox ^0.12.0 1796.1 MiB 1796.2 MiB 🔺 +0.1 MiB (+0.0%)
apify/actor-node-playwright-webkit:26-slim playwright 1.63.0, camoufox ^0.12.0, slim 1444.5 MiB 1444.5 MiB 🔻 −0.0 MiB (−0.0%)
apify/actor-node-playwright:22 playwright 1.63.0, camoufox ^0.12.0 3427.0 MiB 3427.1 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node-playwright:22-slim playwright 1.63.0, camoufox ^0.12.0, slim 3091.4 MiB 3091.4 MiB 🔺 +0.0 MiB (+0.0%)
apify/actor-node-playwright:24 playwright 1.63.0, camoufox ^0.12.0 3240.8 MiB 3240.9 MiB 🔺 +0.1 MiB (+0.0%)
apify/actor-node-playwright:24-slim playwright 1.63.0, camoufox ^0.12.0, slim 2905.1 MiB 2905.1 MiB 🔺 +0.0 MiB (+0.0%)
apify/actor-node-playwright:26 playwright 1.63.0, camoufox ^0.12.0 3387.1 MiB 3387.3 MiB 🔺 +0.2 MiB (+0.0%)
apify/actor-node-playwright:26-slim playwright 1.63.0, camoufox ^0.12.0, slim 3051.5 MiB 3051.5 MiB 🔺 +0.0 MiB (+0.0%)

@vladfrangu vladfrangu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

trim the comments in the yaml files and then merge, sorry and thank you!!

Condense the four-line comment above each camoufox dispatch step to a
single line, per review feedback. No behavior change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TQJXEZ7g4H4fHv76J3hM5D
@B4nan

B4nan commented Sep 9, 2026

Copy link
Copy Markdown
Member

setParametersForTriggeringUpdateWorkflowOnActorTemplates

Now that's a long name.

📦 Image size report

Any idea why the python images got ~3% bigger?

Sidenote - the image size report is nice, but if you need to click though everything to find what you are looking for, it's far away from great. Can we analyze this and highlight if something got bigger or smaller, so we know we should pay attention and toggle those reports?

@vladfrangu

Copy link
Copy Markdown
Member

Any idea why the python images got ~3% bigger?

I feel like this is just run-to-run variance? Nothing else would explain it... (especially since this PR doesn't change py images)

@B4nan

B4nan commented Sep 9, 2026

Copy link
Copy Markdown
Member

Huh, I'd expect those numbers to be fully deterministic, what could cause that? Like some transitive deps changed?

Not a blocker for sure, but those numbers should be deterministic, otherwise they are much less useful.

@vladfrangu

Copy link
Copy Markdown
Member

Yeah my gut says its either transitive deps or certificate changes that branch might be missing? To be fair, the size reporter is supposed to be useful when we do actual image file changes to see rough impact, not perfect..

@l2ysho
l2ysho merged commit 418ed63 into master Sep 9, 2026
69 checks passed
@l2ysho
l2ysho deleted the fix/camoufox-template-dispatch-version branch September 9, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants