Skip to content

fix(ui): use lru-cache v11 API in LineageSceneCache (unbreak main after #37062) - #37073

Merged
anuj-kumary merged 2 commits into
mainfrom
fix/ui-lru-cache-named-import
Nov 4, 2026
Merged

anuj-kumary merged 2 commits into
mainfrom
fix/ui-lru-cache-named-import

Conversation

@anuj-kumary

Copy link
Copy Markdown
Member

Describe your changes:

Fixes the main breakage from #37062 (Dependabot: lru-cache → ^11.5.3). No separate issue; this is a follow-up to that bump.

lru-cache v11 removed the default export and renamed del/reset to delete/clear. LineageSceneCache.utils.ts (from #29204) still used the v6 API, so since #37062 merged:

  • ui-checkstyle fails in the bundle-budget build: [MISSING_EXPORT] "default" is not exported by "node_modules/lru-cache/dist/esm/browser/index.min.js"
  • ui-coverage fails: all 6 LineageSceneCache.utils.test.ts tests (_lrucache.default is not a constructor)

Every PR that merges main in picks this up (e.g. #37049).

Changes in LineageSceneCache.utils.ts: import { LRUCache } from 'lru-cache', del → delete, reset → clear. It's the only lru-cache import in the UI.

Type of change:

  • Bug fix

High-level design:

N/A — small change.

Tests:

Use cases covered

  • Lineage scene cache loads, dedupes, invalidates and evicts with lru-cache v11.

Unit tests

  • Existing LineageSceneCache.utils.test.ts covers it. With lru-cache 11.5.3: 6/6 pass (before: 0/6 with the default import; 2/6 with only the import changed).
  • tsc --strict on the file passes against v11's bundled types; eslint + prettier clean.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Not applicable: API rename only; behaviour is pinned by the unit tests.

Manual testing performed

  • Confirmed v11's browser entry (dist/esm/browser/index.min.js) exports LRUCache by name, which is what the vite build resolves.

UI screen recording:

Not applicable — dependency API fix with no visible change.

Checklist:

  • I have read the CONTRIBUTING document.
  • Decision check: not applicable, no durable decision.

#37062 bumped lru-cache to ^11.5.3, which drops the default export and
renames del/reset to delete/clear. The default import broke the vite
build (MISSING_EXPORT) and every LineageSceneCache test.
@anuj-kumary
anuj-kumary requested a review from a team as a code owner November 4, 2026 15:12
@anuj-kumary anuj-kumary added the safe to test Add this label to run secure Github workflows on PRs label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

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 the UI UI specific issues label Nov 4, 2026
@anuj-kumary anuj-kumary added skip-pr-checks Bypass PR metadata validation check 2.1 labels Nov 4, 2026
@gitar-bot

gitar-bot Bot commented Nov 4, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Switching the lineage scene cache to lru-cache v11 methods could mis-handle invalidation, leaving stale or missing lineage scenes.

Switches LineageSceneCache.utils.ts to the lru-cache v11 API by using the named LRUCache import and renaming del to delete and reset to clear, unbreaking the main build and the related unit tests. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

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

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 81%
81.37% (138281/169931) 68.41% (49865/72890) 71.46% (28015/39200)

@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

@anuj-kumary
anuj-kumary merged commit 4195406 into main Nov 4, 2026
66 of 68 checks passed
@anuj-kumary
anuj-kumary deleted the fix/ui-lru-cache-named-import branch November 4, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.1 safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants