refactor: Support of referencing legacy middlewares in UI5 CLI middleware configuration#1367
Open
d3xter666 wants to merge 243 commits into
Open
refactor: Support of referencing legacy middlewares in UI5 CLI middleware configuration#1367d3xter666 wants to merge 243 commits into
d3xter666 wants to merge 243 commits into
Conversation
…ters Cherry-picked from SAP/ui5-fs@5651627 JIRA: CPOUI5FOUNDATION-1174
Cherry-picked from: SAP/ui5-fs@5651627 JIRA: CPOUI5FOUNDATION-1174
Cherry-picked from: SAP/ui5-builder@ef5a3b2 JIRA: CPOUI5FOUNDATION-1174
Cherry-picked from: SAP/ui5-project@82b20ee JIRA: CPOUI5FOUNDATION-1174
Prerequisite for versioning support Cherry-picked from: SAP/ui5-project@83b5c4f JIRA: CPOUI5FOUNDATION-1174
Cherry-picked from: SAP/ui5-project@cb4e858 JIRA: CPOUI5FOUNDATION-1174
Cherry-picked from: SAP/ui5-cli@d29ead8 JIRA: CPOUI5FOUNDATION-1174
* Improve handling for concurrent resource access and modifications, especially when buffering streams. * Deprecate getStatInfo in favor of dedicated getSize, isDirectory, getLastModified methods. * Deprecate synchronous getStream in favor of getStreamAsync and modifyStream, allowing for atomic modification of resource content * Generate Resource hash using ssri
getIntegrity tests still need to be updated
- page_size=32768: Reduces overflow page chains for compressed blobs (120 KB source index: 15 pages → 4 pages) - mmap_size=256MB: Eliminates pread() syscalls via memory-mapped I/O - cache_size=64MB: Keeps more pages cached for sequential access - Bumps cache version to v0_7 (page_size requires fresh database)
…rehashing Replace recursive _computeHash with non-recursive _recomputeDirectoryHashShallow in ancestor rehash loops. The recursive method recomputed all descendants (~16,000 SHA-256 ops for root in sap.m), while the shallow method only combines existing child hashes (4 ops for a single resource change). Measured improvement: 28ms → 0.36ms (79x) for single-resource delta in sap.m (12,677 resources).
… code Remove unused _recomputeAncestorHashes method (zero callers). Add tests verifying that _recomputeDirectoryHashShallow produces correct hashes at every directory level for multi-depth upserts, sibling modifications, batch removals, and deep leaf changes.
… existence check Reduce gzip compression level from 6 to 1 in BuildCacheStorage.putContent(), yielding ~3-4x faster compression at the cost of ~15-25% larger cache.db. Add findExistingContentIntegrities() batch check to skip compression and INSERT for content already present in the database. This benefits multi-project builds where shared resources may already be stored.
…ia async gzip Replace synchronous gzipSync inside the SQLite transaction with async parallel compression using the libuv thread pool. The writeStageResources method now: 1. Gathers integrity + buffer (existing Phase 1) 2. Batch-checks existing content (existing Phase 1.5) 3. Compresses all buffers in parallel via async gzip with bounded concurrency (new Phase 2) 4. Batch-inserts pre-compressed data in a short transaction (new Phase 3) This separates CPU-bound compression from I/O, letting multiple cores contribute to compression simultaneously while keeping the SQLite transaction window minimal (only fast synchronous INSERTs).
…e I/O When getIntegrity() is called on a FACTORY resource that has a createBufferFactory, materialize the buffer and compute integrity from it. Subsequent getBuffer() calls return the cached buffer with zero additional file I/O, eliminating redundant readFile calls in the build cache writeStageResources flow.
Resources <= 128 bytes are stored uncompressed in the CAS, avoiding gzip overhead that exceeds the compression benefit for tiny inputs. The read path uses gzip magic byte detection for backward compatibility.
e1d781f to
ab65f27
Compare
Build tests: add getRootPath stub and cacheDir to expected args to match the new cache directory parameter in graph.build(). Serve tests: adapt to the non-returning handler pattern (pOnError) by using fire-and-settle instead of awaiting handler completion, and account for the new error callback passed to serverServe.
* Add test for "ui5 --version" * Add test for "ui5 build" (currently testing a TS application) Currently, those tests are not included in any CI pipeline and also need a manual "npm install" (no node_modules included yet).
+ Include "npm install" in test runtime
+ Refactor test environment for better reuse + Extend typescript test to cover Incremental Build
+ Add "application.a" (Javascript project fixture)
Co-authored-by: Copilot <copilot@github.com>
Break long test names to multiple lines to meet max-len 120 limit
0bfc922 to
09a4670
Compare
- Remove cacache dependency from packages/project/package.json - Restore internal/e2e-tests/ files that were incorrectly deleted - Update package-lock.json to match base branch
7aa4cd3 to
95fd5de
Compare
0670d94 to
d029efb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA: CPOUI5FOUNDATION-1206