Skip to content

Commit 65f625c

Browse files
ci: stop rerunning failed integration tests (#22670)
* ci: stop rerunning failed integration tests The '|| ... -f' fallback reruns the whole suite (each part is one jest file), adding minutes and hiding flaky tests behind a green job. * test: re-touch the change close-pending waits on until the watcher sees it On macOS a write made before the watcher is ready goes unseen, so the loader barrier never trips and the case times out. * test: rewrite unseen watch changes instead of only touching their mtime On macOS a re-created file went unseen through three mtime-only re-touches (restored-commonjs-reexport). Rewriting the file emits a content change, and two more tries give a slow runner room. * test: keep touching an unseen directory instead of reading it A file created in a missing directory is tracked as that directory, which readFileSync rejects with EISDIR inside the retry timer. * test: revert the watch re-touch changes Rewriting unseen files and retrying longer did not help on macOS: the watcher still missed the changes, so the harness goes back to main's version. * test: attach the printed stylesheet without a fake load event FakeDocument fires onload 10 ms after appendChild, so on a slow runner the 'still pending' check raced it. A server-rendered link is parsed, not inserted, so attach it directly. * chore(deps): update watchpack to 2.6.1 The macOS integration jobs missed file changes with 2.5.2; with the jest rerun gone they now show whether 2.6.1 sees every change. * test: drop the Firefox font-family quirk the current Firefox no longer has Firefox stable now drops a family name's quotes from its computed value, so the quirk check and the filed New Century Schoolbook divergence both failed. Chrome and WebKit entries are unchanged. * test: stop waiting for a change the finished build no longer depends on A step that drops an import and deletes the imported file can see the importer's change first; the rebuild stops watching the deleted file, so its removal is never reported and re-touching cannot recreate it.
1 parent e538a18 commit 65f625c

8 files changed

Lines changed: 39 additions & 27 deletions

File tree

‎.changeset/090-watchpack-2-6-1.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"webpack": patch
3+
---
4+
5+
Update watchpack to 2.6.1.

‎.github/workflows/test.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,12 +622,12 @@ jobs:
622622
jest-integration-${{ runner.os }}-node-${{ matrix.node-version }}-${{ matrix.part }}-${{ hashFiles('**/yarn.lock', '**/jest.config.js') }}-
623623
jest-integration-${{ runner.os }}-node-${{ matrix.node-version }}-${{ matrix.part }}-
624624
625-
- run: yarn cover:integration:${{ matrix.part }} --ci --cacheDirectory .jest-cache || yarn cover:integration:${{ matrix.part }} --ci --cacheDirectory .jest-cache -f
625+
- run: yarn cover:integration:${{ matrix.part }} --ci --cacheDirectory .jest-cache
626626
env:
627627
MAIN_BRANCHES: ${{ matrix.use_main_branches }}
628628
if: matrix.coverage || matrix.use_main_branches
629629

630-
- run: yarn test:integration:${{ matrix.part }} --ci --cacheDirectory .jest-cache || yarn test:integration:${{ matrix.part }} --ci --cacheDirectory .jest-cache -f
630+
- run: yarn test:integration:${{ matrix.part }} --ci --cacheDirectory .jest-cache
631631
if: ${{ !matrix.coverage && !matrix.use_main_branches }}
632632

633633
- run: yarn report:cover:merge

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
"minimizer-webpack-plugin": "^5.13.0",
142142
"schema-utils": "^4.5.0",
143143
"tapable": "^2.3.0",
144-
"watchpack": "^2.5.2",
144+
"watchpack": "^2.6.1",
145145
"webpack-sources": "^3.6.0"
146146
},
147147
"devDependencies": {

‎test/configCases/css/server-rendered-stylesheet-pending/index.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ it("waits for a server-rendered stylesheet that has not applied yet", async () =
88
printed.rel = "stylesheet";
99
printed.href = "https://test.cases/button.css";
1010
printed.sheet = undefined;
11-
document.head.appendChild(printed);
11+
// parsed from the HTML, not inserted, so FakeDocument fires no load of its own
12+
document.head._attach(printed);
1213

1314
let loaded = false;
1415
const promise = import(/* webpackChunkName: "button" */ "./button.js").then(

‎test/specCases/syntaxEquivalence.spectest.js‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,6 @@ const FILED_WPT_VALUE_DEFECTS = new Map([
270270
[
271271
"background-image:paint(mypaint ",
272272
"webkit only: the unimplemented `paint()` again \u2014 see `paint( mypaint`"
273-
],
274-
[
275-
"font-family:\"New Century Schoolbook\", serif",
276-
"firefox only: not a printer defect — Gecko carries the source's quoting into the computed family where Blink drops it, so unquoting a name neither engine reads differently still reads as a difference there"
277273
]
278274
]);
279275

@@ -2690,20 +2686,6 @@ const ENGINE_QUIRKS = [
26902686
// What Chromium 141 reads, at six significant digits.
26912687
return read !== "38.7953px";
26922688
})
2693-
},
2694-
{
2695-
engines: ["firefox"],
2696-
quirk: "keeps a family name's quotes in its computed value",
2697-
workaround: "`unquoteFamilies` in the page helpers",
2698-
holds: (page) =>
2699-
page.evaluate(() => {
2700-
const element = document.createElement("div");
2701-
element.style.fontFamily = '"Manrope"';
2702-
document.body.append(element);
2703-
const read = getComputedStyle(element).fontFamily;
2704-
element.remove();
2705-
return read.startsWith('"');
2706-
})
27072689
}
27082690
];
27092691

‎test/templates/WatchTestCases.js‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,23 @@ const describeCases = (config) => {
446446
}
447447
}
448448
}
449+
// a change this build no longer depends on cannot make it stale, and
450+
// nothing watches it any more to report it (e.g. a deleted import)
451+
const builds = /** @type {import("../../").Stats[]} */ (
452+
"stats" in stats ? stats.stats : [stats]
453+
);
454+
for (const file of unseenChanges) {
455+
if (
456+
!builds.some(
457+
({ compilation }) =>
458+
compilation.fileDependencies.has(file) ||
459+
compilation.missingDependencies.has(file) ||
460+
isWithin(file, compilation.contextDependencies)
461+
)
462+
) {
463+
unseenChanges.delete(file);
464+
}
465+
}
449466
if (unseenChanges.size > 0) return;
450467
clearTimeout(retouchTimer);
451468
if (run.done && stats.hash === lastHash) return;

‎test/watchCases/simple/close-pending/webpack.config.js‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,14 @@ module.exports = (_env, { srcPath }) =>
5656
const reached = barrier.arm();
5757
try {
5858
replaceValue("update");
59-
await reached;
59+
// a write before the watcher is ready goes unseen (macOS), so
60+
// repeat it, as the harness does, until the loader is reached
61+
const retouch = setInterval(() => replaceValue("update"), 1000);
62+
try {
63+
await reached;
64+
} finally {
65+
clearInterval(retouch);
66+
}
6067
replaceValue("later");
6168
watching.invalidate();
6269
let callbacks = 0;

‎yarn.lock‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10142,10 +10142,10 @@ wast-loader@^1.12.1:
1014210142
dependencies:
1014310143
wabt "1.0.0-nightly.20180421"
1014410144

10145-
watchpack@^2.5.2:
10146-
version "2.5.2"
10147-
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.5.2.tgz#e12e82d84674266fc1c6dbfe38891b92ff0522ec"
10148-
integrity sha512-6i/00NBjP4yGPs+caKSyRfpTF/8Torsu0MOW3mMzIbhgISFder8i7xbqgHlLMwJrdiN8ndBV3UA1/AfzPSr+jg==
10145+
watchpack@^2.6.1:
10146+
version "2.6.1"
10147+
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.6.1.tgz#fda5ef91ab74cdba7e9105e0bd2b03268b6818aa"
10148+
integrity sha512-8mk/LnXpQAiM2xKZhTkxikwly5GhL2Z+DWiLTkMa/E1Nfv9zURhHgiFyWvM4BWqW+LjIgL2AIS7JntEUx6v3vQ==
1014910149
dependencies:
1015010150
graceful-fs "^4.1.2"
1015110151

0 commit comments

Comments
 (0)