Skip to content

[Maintenance][CI] Run the PDF scenarios with PDFKiln instead of the archived wkhtmltopdf - #452

Open
Jamalofski wants to merge 2 commits into
Sylius:2.1from
Jamalofski:wkhtmltopdf-pdfkiln
Open

Jamalofski wants to merge 2 commits into
Sylius:2.1from
Jamalofski:wkhtmltopdf-pdfkiln

Conversation

@Jamalofski

Copy link
Copy Markdown
Q A
Branch? 2.1
Bug fix? no
New feature? no
Related tickets –

The build installs the jammy package of wkhtmltopdf 0.12.6.1-2 on ubuntu-latest; wkhtmltopdf is archived, with no release since 2020. This installs PDFKiln instead, with the pdfkiln/setup action: a drop-in replacement for wkhtmltopdf 0.12.6, same command line, rendering with a current Chromium (MIT, https://github.com/pdfkiln/pdfkiln). The action puts the latest release in the tool cache, checked against its SHA256SUMS, and the next step points WKHTMLTOPDF_PATH at its wkhtmltopdf (the test application's .env gives /usr/local/bin/wkhtmltopdf). The matrix label becomes pdfkiln; the jobs without PDF generation are unchanged.

Tested locally with the test application built as SyliusLabs/BuildTestAppAction builds it (Sylius 2.2, Symfony 7.4, PostgreSQL 16, front assets built with Node 24), on 2.3, whose build has the same steps: the @pdf_enabled scenarios pass, 5 of 5, with the legacy PDF generation on and off, with PDFKiln 1.5.1 installed by the action as with wkhtmltox 0.12.6.1; the invoice keeps its page and its text.

Disclosure: I maintain PDFKiln.

@Jamalofski

Copy link
Copy Markdown
Author

The PDF jobs stopped while building the test application, with "The binary 'wkhtmltopdf' is not executable.": on 2.1, the test application sets no knp_snappy binary, so KnpSnappy gets the bare name wkhtmltopdf and refuses it, whatever is installed. The second commit adds the block 2.3 has, as Sylius/RefundPlugin#502 did on RefundPlugin's 2.1 in July. The Sylius 2.1 jobs still stop earlier, at composer install: Composer now refuses every Sylius 2.1.x for its security advisories.

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.

1 participant