Skip to content

feat(admin): single source of truth for SAPUI5 version - #2659

Merged
jung-thomas merged 1 commit into
DEVfrom
worktree-ui5-version-ssot
Oct 5, 2026
Merged

jung-thomas merged 1 commit into
DEVfrom
worktree-ui5-version-ssot

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

What

Introduces app/admin-shell/ui5-version.json as the single source of truth for the SAPUI5 version used by the Admin UI and display-app. Edit cdnVersion there and npm run apply:ui5-version propagates it to every consumer; CI fails on drift.

Why

On 2026-10, SAP purged 1.136.0 from the UI5 CDN and the admin-shell bootstrap URL 404'd — taking the entire Admin UI down in PROD (hotfixed in #2658 by repinning to 1.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:

  • 2 CDN loader URLs — app/admin-shell/webapp/index.html and app/display-app/index.html are now generated from index.template.html siblings ({{UI5_CDN_VERSION}} token).
  • 32 ui5.yaml framework.version values (every app/admin/* + app/admin-shell), discovered dynamically.
  • admin-shell manifest.template.json minUI5Version floor (from minVersionFloor).

The 53 app/admin/*/manifest minUI5Version floors 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.cjs is both:

  • generator — default/--fix mode rewrites all consumers; wired into root prebuild (npm run apply:ui5-version) and admin-shell prebuild/prestart.
  • CI drift guard — --check mode (registered as check-ui5-version in scripts/run-static-guards.ts, run by static-guards.yml on PR + push to main/DEV). Auto-fixable via npm run static-guards -- --fix.

Generated index.html files stay committed (matching the existing generate-manifest pattern) and carry a GENERATED banner.

Verification

  • apply regenerates 35 consumers; --check → green.
  • Flipping cdnVersion to a bogus value → guard exits 1 and names all 34 drifted files; restoring → green.
  • admin-shell ui5 build succeeds; shipped dist/index.html loads 1.148.12.
  • Full run-static-guards.ts → 17/17 checks passed, including check-ui5-version.

Follow-up to the #2658 outage fix, as a separate improvement PR.

…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.
@jung-thomas
jung-thomas merged commit 43e33e7 into DEV Oct 5, 2026
6 of 7 checks passed
@jung-thomas
jung-thomas deleted the worktree-ui5-version-ssot branch October 5, 2026 17:51
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.

1 participant