ci(ui-test): clean root-owned build artifacts so runner teardown succeeds #84

Merged
developer merged 1 commits from feature/ci-ui-test-build-cleanup into development 2026-05-31 10:35:01 +00:00
Owner

What & why

Follow-up to #83. The post-merge go-unit run on development was marked
failed even though every test passed (Job succeeded in the log). The
real cause was the runner teardown:

failed to remove host workspace …: unlinkat …/ui/frontend/build: permission denied

In host-mode the ui-test job runs as root, so vite (test:pwa),
svelte-kit and Playwright write build/, .svelte-kit/, test-results/
and playwright-report/ root-owned into the shared host workspace. The
act_runner (non-root) then can't remove them at teardown, which
intermittently fails whichever job inherits the dirty workspace — this time
go-unit on the #83 merge. No test failure; a pure infra false-negative.

Fix

Add an if: always() step at the end of ui-test that removes those
generated dirs while the step still has root, after the artifact uploads.
The shared workspace is left clean for the runner's own teardown and for
later jobs, so the spurious cross-job failures stop.

Notes

  • Targets the generated outputs the UI test steps produce; node_modules
    was never the reported blocker (pnpm store/symlinks) so it is left alone.
  • Verified the diagnosis from the #83 merge job logs: no --- FAIL in any
    job, all end with Job succeeded followed by the same unlinkat cleanup
    error; dev-deploy, fbs-codegen and integration were green despite
    the same cleanup line.
## What & why Follow-up to #83. The post-merge `go-unit` run on `development` was marked **failed** even though every test passed (`Job succeeded` in the log). The real cause was the runner teardown: ``` failed to remove host workspace …: unlinkat …/ui/frontend/build: permission denied ``` In host-mode the `ui-test` job runs as **root**, so `vite` (`test:pwa`), `svelte-kit` and Playwright write `build/`, `.svelte-kit/`, `test-results/` and `playwright-report/` **root-owned** into the shared host workspace. The `act_runner` (non-root) then can't remove them at teardown, which intermittently fails whichever job inherits the dirty workspace — this time `go-unit` on the #83 merge. No test failure; a pure infra false-negative. ## Fix Add an `if: always()` step at the end of `ui-test` that removes those generated dirs while the step still has root, after the artifact uploads. The shared workspace is left clean for the runner's own teardown and for later jobs, so the spurious cross-job failures stop. ## Notes - Targets the generated outputs the UI test steps produce; `node_modules` was never the reported blocker (pnpm store/symlinks) so it is left alone. - Verified the diagnosis from the #83 merge job logs: no `--- FAIL` in any job, all end with `Job succeeded` followed by the same `unlinkat` cleanup error; `dev-deploy`, `fbs-codegen` and `integration` were green despite the same cleanup line.
developer added 1 commit 2026-05-31 10:15:53 +00:00
ci(ui-test): clean root-owned build artifacts so runner teardown succeeds
Tests · UI / test (push) Waiting to run
Tests · UI / test (pull_request) Successful in 3m24s
eb549e6049
In host-mode the ui-test job runs as root, so vite (test:pwa),
svelte-kit and Playwright write build/, .svelte-kit/, test-results/ and
playwright-report/ root-owned into the shared host workspace. The
act_runner (non-root) then cannot remove them at teardown
("unlinkat ui/frontend/build: permission denied"), which spuriously
marks this or a sibling job that inherits the dirty workspace as failed
— it hit go-unit on the #83 merge even though every test passed.

Add an `if: always()` step that removes those generated dirs while the
job still has root, after the artifact uploads. Keeps the shared
workspace clean for the runner's own teardown and for later jobs.
owner approved these changes 2026-05-31 10:33:18 +00:00
developer merged commit 3d7e4d30bb into development 2026-05-31 10:35:01 +00:00
developer deleted branch feature/ci-ui-test-build-cleanup 2026-05-31 10:35:01 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: developer/galaxy-game#84