Skip to content

fix(ui): avoid intermittent Less worker build failures - #33797

Merged
chirag-madlani merged 1 commit into
mainfrom
chirag-madlani/less-preprocessor-in-process
Sep 22, 2026
Merged

chirag-madlani merged 1 commit into
mainfrom
chirag-madlani/less-preprocessor-in-process

Conversation

@chirag-madlani

@chirag-madlani chirag-madlani commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Describe your changes:

Compile Less in-process by setting preprocessorMaxWorkers: 0 in vite.config.ts.

Vite runs Less compilation in a worker pool by default (preprocessorMaxWorkers: true). Under CI resource pressure, a Less worker can crash mid-compile and return an error object without a .message property; Vite's error handler then throws TypeError: Cannot read properties of undefined (reading 'message') while trying to format the message, and the build fails on a stylesheet that is itself valid.

Reproduced this failure from the RDF CI build using the existing application stylesheets. See failure signature in maven-sonarcloud-ci on #33794 — a Java-only PR whose diff cannot touch Less, but which still tripped this on components/Customization/GenericTab/generic-tab.less:9:0.

Type of change:

  • Bug fix (build stability)

Tests:

Validated 10 stress builds and five full builds of each release/coarse variant with zero failures. All 860 coarse JavaScript/CSS artifacts match the browser-validated output byte for byte — no runtime change.

Notes:

Cherry-picked from #33088 (commit f1a7cac26a) to land as a small, independently-mergeable PR. Original commit authored by @harshach.

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge because the configuration value is supported and directly addresses the reported worker-pool instability.

Summary

This PR makes Less compilation run in-process to avoid intermittent worker crashes during UI builds.

  • Changes css.preprocessorMaxWorkers from true to 0.
  • Applies consistently to development, production, analysis, and Playwright build variants.
  • Does not alter generated application behavior or introduce a security-sensitive flow.

Reviews (1) · Last reviewed commit: "fix(ui): avoid intermittent Less worker ..."

Compile Less in-process after reproducing the Vite worker failure from
the RDF CI build with the existing application stylesheets.

Validated 10 stress builds and five full builds of each release/coarse
variant with zero failures. All 860 coarse JavaScript/CSS artifacts match
the browser-validated output byte for byte.

(cherry picked from commit f1a7cac)
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Sep 22, 2026
@gitar-bot

gitar-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Changes Less compilation from a worker pool to in-process Vite execution.

Fixes intermittent Less worker build failures by compiling in-process with preprocessorMaxWorkers: 0 in vite.config.ts. Validated with stress and full builds across release variants with zero failures and byte-for-byte matching output. No issues found.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@github-actions

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 19b2b41e86352a1a8a6c4a90b31216eb2a87a236 in Playwright run 35712867610, attempt 1.

✅ 557 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 51m 22s

⏱️ Max setup 4m 42s · max shard execution 18m 50s · max shard-job elapsed before upload 22m 31s · reporting 3s

🌐 232.33 requests/attempt · 2.24 app boots/UI scenario · 39.20% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 39.2% (convergence target: at most 15%).
  • Browser traffic was 232.33 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.24 per UI scenario (1292 boots / 578 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 124 0 0 0 0 0
✅ Shard chromium-02 132 0 0 0 0 0
✅ Shard chromium-03 143 0 0 0 0 0
✅ Shard data-asset-rules-01 65 0 0 0 0 0
✅ Shard domain-isolation-01 16 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-01 11 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

Merged via the queue into main with commit 56bc2f7 Sep 22, 2026
103 of 105 checks passed
@chirag-madlani
chirag-madlani deleted the chirag-madlani/less-preprocessor-in-process branch September 22, 2026 12:18

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants