mirror of
https://github.com/hanzoai/pack.git
synced 2026-09-30 23:43:13 +00:00
feat(build): support package overrides with spread operator (#645)
* test(node-puppeteer): add test case for package override bug Generated-by: aiautocommit * test(node-puppeteer): preserve default packages in custom config - Use the spread operator in apt package overrides to retain required Puppeteer dependencies during tests. Generated-by: aiautocommit * feat(core): add pretty print style for deprecation logs Generated-by: aiautocommit * feat(generate): support package overriding with ... operator - Add support for explicit package overrides using the `...` operator in `buildAptPackages` and `deploy.aptPackages`. - Emit deprecation warnings when `buildAptPackages` is specified without `...` before transitioning to replacement behavior. - Emit info logs when `deploy.aptPackages` replaces generated packages without `...`. Generated-by: aiautocommit * feat(logger): add suggestion log level with optional documentation links Generated-by: aiautocommit * refactor(generate): use suggestion log type for apt package warnings Generated-by: aiautocommit * docs(guides): document apt package override syntax using ... Generated-by: aiautocommit * test(generate): update apt packages deprecation and suggestion log assertions Generated-by: aiautocommit * feat(tasks): add optional case filter to integration test task Generated-by: aiautocommit * test(integration): increase timeouts for QEMU emulated workloads - Extend container execution timeout from 2 to 3 minutes in integration tests - Increase Puppeteer launch and navigation timeouts in the node-puppeteer example to prevent failures on emulated arm runners Generated-by: aiautocommit * test(node-puppeteer): skip amd64 override case on arm64 QEMU-emulated Chrome on GHA arm runners hangs past the container timeout; native amd64 CI already covers the apt package override case. --------- Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
committed by
GitHub
co-authored by
Hanzo Dev
parent
e26e0a76cf
commit
6b992e780a
@@ -1,18 +1,25 @@
|
||||
const puppeteer = require("puppeteer");
|
||||
|
||||
// Cross-platform CI builds linux/amd64 under QEMU on arm runners; Chrome
|
||||
// startup and navigation need more than Puppeteer's 30s defaults.
|
||||
const qemuFriendlyTimeoutMs = 180_000;
|
||||
|
||||
(async () => {
|
||||
console.log("Starting Puppeteer");
|
||||
const browser = await puppeteer.launch({
|
||||
headless: true,
|
||||
args: ["--no-sandbox"],
|
||||
timeout: qemuFriendlyTimeoutMs,
|
||||
});
|
||||
const version = await browser.version();
|
||||
console.log(`Chrome version: ${version}`);
|
||||
console.log("Creating Page");
|
||||
const page = await browser.newPage();
|
||||
console.log("Navigating to hackernews");
|
||||
await page.goto("https://news.ycombinator.com", {
|
||||
page.setDefaultTimeout(qemuFriendlyTimeoutMs);
|
||||
console.log("Navigating to example.com");
|
||||
await page.goto("https://example.com", {
|
||||
waitUntil: "networkidle2",
|
||||
timeout: qemuFriendlyTimeoutMs,
|
||||
});
|
||||
|
||||
await browser.close();
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.railpack.com",
|
||||
"buildAptPackages": ["...", "curl"],
|
||||
"deploy": {
|
||||
"aptPackages": ["...", "curl"]
|
||||
}
|
||||
}
|
||||
@@ -4,5 +4,14 @@
|
||||
// Puppeteer's bundled Chromium does not ship ARM64 binaries; skip on ARM runners
|
||||
// See https://github.com/puppeteer/puppeteer/issues/7740
|
||||
"skipArch": ["arm64"]
|
||||
},
|
||||
{
|
||||
"expectedOutput": "Hello from puppeteer",
|
||||
"platform": "linux/amd64",
|
||||
// Custom packages must retain Railpack's required Puppeteer dependencies.
|
||||
// Skip on ARM: GHA arm runners emulate amd64 via QEMU, and Chrome never
|
||||
// finishes launching within the container timeout. Covered on native amd64 CI.
|
||||
"skipArch": ["arm64"],
|
||||
"configFile": "railpack.custom-apt-packages.json"
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user