Repository navigation
feat(admin): single source of truth for SAPUI5 version - #2659
Merged
Merged
Conversation
…son)
Collapse the ~85 hardcoded UI5 version strings behind one file,
app/admin-shell/ui5-version.json, driving:
- the 2 CDN bootstrap URLs (admin-shell + display-app index.html,
now GENERATED from index.template.html)
- the 32 ui5.yaml framework.version values (admin + admin-shell)
- the admin-shell manifest.template.json minUI5Version floor
scripts/apply-ui5-version.cjs is both the generator (prebuild hook,
`npm run apply:ui5-version`) and the CI drift guard (`--check`,
registered as check-ui5-version in run-static-guards.ts; auto-fixable).
A bump is now a one-line edit; CI fails any consumer that drifts.
Motivation: on 2026-10 SAP purged 1.136.0 from the CDN and the
admin-shell bootstrap 404'd, taking the whole Admin UI down in PROD
(fixed in #2658). This prevents a recurrence from a missed edit.
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.
What
Introduces
app/admin-shell/ui5-version.jsonas the single source of truth for the SAPUI5 version used by the Admin UI and display-app. EditcdnVersionthere andnpm run apply:ui5-versionpropagates it to every consumer; CI fails on drift.Why
On 2026-10, SAP purged
1.136.0from the UI5 CDN and the admin-shell bootstrap URL 404'd — taking the entire Admin UI down in PROD (hotfixed in #2658 by repinning to1.148.12). The version was hardcoded in ~85 places, so a bump is error-prone and a missed spot can silently break production. This collapses it to one file + a guard.Scope (as designed)
One version file drives:
app/admin-shell/webapp/index.htmlandapp/display-app/index.htmlare now generated fromindex.template.htmlsiblings ({{UI5_CDN_VERSION}}token).ui5.yamlframework.versionvalues (everyapp/admin/*+app/admin-shell), discovered dynamically.manifest.template.jsonminUI5Versionfloor (fromminVersionFloor).The 53
app/admin/*/manifestminUI5Versionfloors are intentionally left alone — a compile floor, not a loader URL; it does not 404 at runtime when a patch is purged.How it works
scripts/apply-ui5-version.cjsis both:--fixmode rewrites all consumers; wired into rootprebuild(npm run apply:ui5-version) and admin-shellprebuild/prestart.--checkmode (registered ascheck-ui5-versioninscripts/run-static-guards.ts, run bystatic-guards.ymlon PR + push to main/DEV). Auto-fixable vianpm run static-guards -- --fix.Generated
index.htmlfiles stay committed (matching the existinggenerate-manifestpattern) and carry a GENERATED banner.Verification
applyregenerates 35 consumers;--check→ green.cdnVersionto a bogus value → guard exits 1 and names all 34 drifted files; restoring → green.ui5 buildsucceeds; shippeddist/index.htmlloads1.148.12.run-static-guards.ts→ 17/17 checks passed, includingcheck-ui5-version.Follow-up to the #2658 outage fix, as a separate improvement PR.