Skip to content

test(project): Reproduce abort/retry delta over-write - #1627

Merged
matz3 merged 1 commit into
mainfrom
test/build-server-delta-build-abort
Oct 1, 2026
Merged

matz3 merged 1 commit into
mainfrom
test/build-server-delta-build-abort

Conversation

@matz3

@matz3 matz3 commented Sep 30, 2026

Copy link
Copy Markdown
Member

Add a minimal reproduction of the build-server abort/retry over-write. A delta rebuild only re-processes the files that actually changed. When such a rebuild is aborted mid-flight and restarted, the retry re-processes ALL files the task handles instead of just the changed one. The served output stays correct (the retry writes the same bytes), so this is an optimization gap — redundant writes of unchanged files — rather than a correctness fault.

The replaceCopyright task substitutes ${copyright} in every file that contains it; the library.d fixture has two such files (some.js and .library). The test runs three builds:

  1. Build once so the caches are warm.
  2. A clean delta rebuild that changes only some.js. replaceCopyright writes only some.js. This already passes today.
  3. The same delta, but aborted mid-build and retried. The retry should again write only some.js, but today it also re-writes .library.

Steps 2 and 3 use the same skipped-task set and expect the same written delta, so the aborted build differs from the clean one only in the replaceCopyright written set. That isolates the abort as the sole cause of the over-write. Both are asserted via the FixtureTester writtenResources assertion.

To drive the mid-build abort, requestResource gains an onBuildStatus hook that is attached for the duration of the request, so tests no longer hand-roll the process.on/off dance around byPath. _assertBuild dedupes the skipped-task list because an abort+retry emits one task-skip event per attempt.

Marked test.serial.failing until the abort/retry delta is optimized to re-process only the changed file.

JIRA: CPOUI5FOUNDATION-1363

Add a minimal reproduction of the build-server abort/retry over-write. A
delta rebuild only re-processes the files that actually changed. When
such a rebuild is aborted mid-flight and restarted, the retry
re-processes ALL files the task handles instead of just the changed one.
The served output stays correct (the retry writes the same bytes), so
this is an optimization gap — redundant writes of unchanged files —
rather than a correctness fault.

The replaceCopyright task substitutes ${copyright} in every file that
contains it; the library.d fixture has two such files (some.js and
.library). The test runs three builds:

  1. Build once so the caches are warm.
  2. A clean delta rebuild that changes only some.js. replaceCopyright
     writes only some.js. This already passes today.
  3. The same delta, but aborted mid-build and retried. The retry should
     again write only some.js, but today it also re-writes .library.

Steps 2 and 3 use the same skipped-task set and expect the same written
delta, so the aborted build differs from the clean one only in the
replaceCopyright written set. That isolates the abort as the sole cause
of the over-write. Both are asserted via the FixtureTester
writtenResources assertion.

To drive the mid-build abort, requestResource gains an onBuildStatus
hook that is attached for the duration of the request, so tests no
longer hand-roll the process.on/off dance around byPath. _assertBuild
dedupes the skipped-task list because an abort+retry emits one task-skip
event per attempt.

Marked test.serial.failing until the abort/retry delta is optimized to
re-process only the changed file.

JIRA: CPOUI5FOUNDATION-1363
@matz3
matz3 requested a review from a team September 30, 2026 14:03
@matz3 matz3 changed the title test(project): Reproduce abort/retry delta over-write minimally test(project): Reproduce abort/retry delta over-write Oct 1, 2026
@matz3
matz3 merged commit 369e3e4 into main Oct 1, 2026
77 checks passed
@matz3
matz3 deleted the test/build-server-delta-build-abort branch October 1, 2026 07:31
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.

2 participants