[
https://issues.apache.org/jira/browse/ATLAS-5328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18094016#comment-18094016
]
ASF subversion and git services commented on ATLAS-5328:
--------------------------------------------------------
Commit 16384c12065dc64d43d4a5b2937a817d5881e765 in atlas's branch
refs/heads/atlas-2.6 from Farhan Khan
[ https://gitbox.apache.org/repos/asf?p=atlas.git;h=16384c120 ]
ATLAS-5328: (UI) Build optimizations for atlas-dashboard (React UI)
> Atlas UI : Reduce atlas-dashboard (React UI) Maven build time — npm ci,
> frontend build optimizations, and RE npm cache persistence
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: ATLAS-5328
> URL: https://issues.apache.org/jira/browse/ATLAS-5328
> Project: Atlas
> Issue Type: Improvement
> Components: atlas-webui
> Affects Versions: 3.0.0
> Reporter: Prasad P. Pawar
> Assignee: Prasad P. Pawar
> Priority: Major
> Attachments: Screenshot from 2026-07-06 16-31-14 1.png, Screenshot
> from 2026-07-06 16-45-45.png
>
>
> Background
> Build performance analysis shows atlas-dashboard (Apache Atlas React UI) is
> the slowest reactor module (~16 min),
> with npm install alone taking ~15m 27s. The build uses frontend-maven-plugin
> with a cold npm install into target/atlas-webapp (node_modules excluded on
> copy),
> plus a nested atlas-lineage prebuild. Full install savings require both Atlas
> code changes and RE cache persistence.
> Problem
> • dashboard/pom.xml runs npm install (not npm ci) into a fresh
> target/atlas-webapp
> • Node v22.14.0 is re-installed into target/atlas-build when target is
> recreated
> • package.json prebuild runs a second npm install + webpack build for
> atlas-lineage
> • Production build runs full tsc before vite build
> • RE builds use no_cache=True with no persisted NPM_CONFIG_CACHE → every
> build
> downloads all packages from the registry (~15 min)
> Scope — Atlas (dashboard module)
> 1. Change frontend-maven-plugin npm goal: install → ci (--no-audit --no-fund)
> 2. Configure NPM_CONFIG_CACHE via frontend-maven-plugin environmentVariables
> (default: ~/.npm-cache/atlas-dashboard) and document path for RE
> 3. Move Node installDirectory outside target/ (e.g.
> dashboard/.frontend-toolchain)
> 4. Optimize atlas-lineage prebuild to avoid redundant nested npm install on
> every build
> 5. Use vite build for Maven packaging; keep tsc typecheck in verify/CI profile
> 6. Tune dashboard/.npmrc (audit=false, fund=false, prefer-offline=true)
> 7. Harden postinstall (ensure-native-deps.mjs) to avoid secondary npm fetches
> on Linux
> RE dependencies (required for full ~10–13 min install savings)
> 1. Persist npm content cache across P2 builds — must survive no_cache
> workspace wipe
> • Set before mvn: NPM_CONFIG_CACHE=<stable agent path, e.g.
> /home/jenkins/.npm-cache/atlas-dashboard>
> • Set: npm_config_prefer_offline=true
> • Do not delete agent-level cache when no_cache=True clears workspace
> 2. Optional: Jenkins cache step or shared NFS cache for multi-agent farms
> 3. Optional: persist dashboard/.frontend-toolchain after Atlas moves Node out
> of target/
> 4. Verify warm-cache behavior: second consecutive build on same agent should
> show
> dashboard npm step ~1–3 min vs ~15 min baseline
> Out of scope
> • Maven -T parallelism, Maven repo 404 resolver order, docs module skipDocs,
> Nexus deploy lock wait
> Acceptance criteria
> • Atlas changes merged: npm ci, env cache config, lineage prebuild
> optimization
> • RE confirms NPM_CONFIG_CACHE persisted on RHEL8 P2 atlas builds
> • Documented before/after dashboard module time (cold vs warm cache)
> • Cold first build on empty cache: acceptable ~12–15 min install
> • Warm cache (same agent, unchanged lockfile): dashboard npm step < 3 min
> • Functional parity: WAR/dist output unchanged, no regression in UI build
> References
> • Module: dashboard/pom.xml, dashboard/package.json, atlas-lineage prebuild
--
This message was sent by Atlassian Jira
(v8.20.10#820010)