bug: flaky e2e attachment restore/replace — write+reload round trip races the 10s WDIO timeout #39
Labels
No labels
breaking
bug
ci
dependencies
documentation
feature
security
skip-changelog
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thierryade/backend#39
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Intermittent timeouts in
e2e/attachments.spec.ts, seen on run #96 (bothsupprime un fichier hérité puis le restaureandpropose de remplacer un fichier du même nomfailed the same way):Root cause: in
AttachmentList.vue, every write action (restore,confirmReplace, …) goes throughsettle(), which on success callsload()— this setsloading.value = trueand briefly replaces the entire attachment list with a<p>Chargement…</p>placeholder while it re-fetches it (a second full network round trip after the write itself). The gap between the previous test's log line and the WDIO failure is ~10.07s — almost exactlywaitforTimeout: 10000inwdio.conf.ts— so this is a real timeout being hit, not a logic bug: the write+reload round trip occasionally takes longer than 10s.The e2e job starts gunicorn with no
--workersflag (package.json'stest:e2escript), i.e. a single synchronous worker, serializing every request to the dev server during the test run. Production (Dockerfile) already runs--workers 3; the e2e job never got the same treatment. As the shared Forgejo runner (ci-base, used across 7+ repos) carries more concurrent CI load, this single-worker dev server increasingly can't keep up within the fixed timeout — matching the "happens more and more often, passes on retry" pattern.Fix applied: give the e2e gunicorn
--workers 2(lighter than prod's 3, appropriate for a CI VM, but enough that the write and the list-reload aren't serialized behind each other or other traffic).Not linked to a Thierryade spec: this is a CI/test-infrastructure fix, not a product-behavior change, and no existing spec covers e2e test-runner resourcing.
🤖 Found and fixed with Claude Code