Skip to content

Backport #29181 task and incident utility split to 1.13 - #31052

Open
shah-harshit wants to merge 1 commit into
ui/direct-1.13-seq35-36-glossary-service-lazyfrom
ui/direct-1.13-seq37-29181-task-incident-profiler-split
Open

Backport #29181 task and incident utility split to 1.13#31052
shah-harshit wants to merge 1 commit into
ui/direct-1.13-seq35-36-glossary-service-lazyfrom
ui/direct-1.13-seq37-29181-task-incident-profiler-split

Conversation

@shah-harshit

Copy link
Copy Markdown
Contributor

Summary

Tracking

Testing

  • git diff --check HEAD~1..HEAD

* perf(ui): split task, incident, and data quality utilities (#29181)

* perf(ui): split task and data quality utilities

* fix(ui): resolve tasks data quality lazy split

* fix(ui): remove tasks utils barrel exports

* fix(ui): remove duplicate query builder css import

* fix(ui): dedupe task action utils mock

* Update generated TypeScript types

* Fix incident reopen backport build

* Update generated TypeScript types

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 33b3451)
@shah-harshit
shah-harshit requested a review from a team as a code owner August 5, 2026 13:34
@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Aug 5, 2026
@shah-harshit shah-harshit self-assigned this Aug 5, 2026
Comment on lines +59 to +62
const taskFormSchemaCache = new Map<
string,
Promise<TaskFormSchema | undefined>
>();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Quality: Task form schema cache uses bare Map instead of lru-cache

taskFormSchemaCache is a bare Map used as a module-level cache keyed by ${taskType}::${taskCategory} with no eviction bound. The project's caching guideline requires lru-cache over a bare Map/plain object. Impact is low here since the key space (task type × category) is finite, but consider switching to lru-cache for consistency with the codebase convention.

Use lru-cache with a bounded size instead of a bare Map.:

import { LRUCache } from 'lru-cache';

const taskFormSchemaCache = new LRUCache<
  string,
  Promise<TaskFormSchema | undefined>
>({ max: 100 });
  • Apply fix

Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎

@gitar-bot

gitar-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Code Review 👍 Approved with suggestions 0 resolved / 1 findings

Backports the task and incident utility split from #29181 to branch 1.13. Consider replacing the bare Map in the task form schema cache with lru-cache to prevent unbounded memory growth.

💡 Quality: Task form schema cache uses bare Map instead of lru-cache

📄 openmetadata-ui/src/main/resources/ui/src/utils/TaskFormSchemaUtils.ts:59-62

taskFormSchemaCache is a bare Map used as a module-level cache keyed by ${taskType}::${taskCategory} with no eviction bound. The project's caching guideline requires lru-cache over a bare Map/plain object. Impact is low here since the key space (task type × category) is finite, but consider switching to lru-cache for consistency with the codebase convention.

Use lru-cache with a bounded size instead of a bare Map.
import { LRUCache } from 'lru-cache';

const taskFormSchemaCache = new LRUCache<
  string,
  Promise<TaskFormSchema | undefined>
>({ max: 100 });
🤖 Prompt for agents
Code Review: Backports the task and incident utility split from #29181 to branch 1.13. Consider replacing the bare Map in the task form schema cache with lru-cache to prevent unbounded memory growth.

1. 💡 Quality: Task form schema cache uses bare Map instead of lru-cache
   Files: openmetadata-ui/src/main/resources/ui/src/utils/TaskFormSchemaUtils.ts:59-62

   `taskFormSchemaCache` is a bare `Map` used as a module-level cache keyed by `${taskType}::${taskCategory}` with no eviction bound. The project's caching guideline requires `lru-cache` over a bare `Map`/plain object. Impact is low here since the key space (task type × category) is finite, but consider switching to `lru-cache` for consistency with the codebase convention.

   Fix (Use lru-cache with a bounded size instead of a bare Map.):
   import { LRUCache } from 'lru-cache';
   
   const taskFormSchemaCache = new LRUCache<
     string,
     Promise<TaskFormSchema | undefined>
   >({ max: 100 });

Options

Display: compact → Showing less information.

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

Compact
gitar display:verbose         

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

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

❌ UI Checkstyle Failed

❌ ESLint + Prettier + Organise Imports (src)

One or more source files have linting or formatting issues.

❌ Licence Header

One or more files are missing or have an outdated Apache 2.0 licence header.

Affected files
  • openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/TaskFeedCard/TaskFeedCardFromTask.component.test.tsx
    • openmetadata-ui/src/main/resources/ui/src/components/NotificationBox/NotificationFeedCard.test.tsx
    • openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/TaskPayloadSchemaFields.tsx
    • openmetadata-ui/src/main/resources/ui/src/utils/TaskFormSchemaUtils.ts

❌ Tailwind Audit

Hardcoded Tailwind values found. Use a design-system utility (run yarn tw-audit:report for the token each value maps to).

❌ Antd + Less Deprecation Guard

A new antd import or new .less file was added. Use UntitledUI + Tailwind for new work.

Affected files

at Function._resolveFilename (node:internal/modules/cjs/loader:1401:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1057:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1062:22)
at Function._load (node:internal/modules/cjs/loader:1211:37)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)
at node:internal/main/run_main_module:36:49 {


Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

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 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.

1 participant