Skip to content

Fixes 30612: render every custom-property type correctly in intake forms - #30614

Merged
anuj-kumary merged 27 commits into
mainfrom
harshach/intake-form-property-bug
Jul 30, 2026
Merged

anuj-kumary merged 27 commits into
mainfrom
harshach/intake-form-property-bug

Conversation

@harshach

@harshach harshach commented Jul 29, 2026 •

Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes #30612

I reworked how intake-form custom properties are rendered and serialized in the Create Domain / Data Product / Glossary Term forms, because the previous implementation used a private type→widget switch in AddDomainForm that only handled enum/integer/number/string — so hyperlink-cp fell through to a plain text input and POSTed a bare string (the 400 in this issue), entityReference was hardcoded to a user/team picker that ignored customPropertyConfig (a property restricted to glossaryTerm listed users), and every remaining type produced a payload shape the backend rejects. Custom properties are now rendered by dedicated per-type widgets in both form stacks, serialized through one shared serializeExtensionValue helper so every submit path emits backend-valid shapes, and grouped under a "Custom Properties" section with a property-type badge. This also adds intake-form support to the Create Glossary Term modal, which had none even though the backend enforces intake forms on POST /v1/glossaryTerms, and lets intake forms include optional (not just required) fields via a new formFields array with a per-field required flag.

Type of change:

  • Bug fix
  • Improvement

High-level design:

UI — two form stacks, one serializer. The create forms live on two different stacks, so the widgets are implemented twice but the payload logic is shared:

  • AddDomainFormExtensionFields.tsx (new) — react-aria/react-hook-form widgets for Create Domain + Data Product. Kept the core-components USER_TEAM_SELECT_INPUT widget for entity references but fed it from a new fetchExtensionReferenceOptions, which searches getCustomPropertyReferenceSearchIndex(definition) and stores a real EntityReference. Deliberately avoided embedding DataAssetAsyncSelectList here: it is Ant Design, and antd popups portal to document.body and break inside the react-aria create drawers.
  • GlossaryTermIntakeFields.component.tsx (new) — antd widgets for the Create Glossary Term modal, which is an antd Modal, so it reuses the existing DataAssetAsyncSelectList, DatePicker, SchemaEditor, etc.
  • serializeExtensionValue (in CustomProperty.utils.ts) is shape-based and stack-agnostic, so all three submit paths — the domain form's own submit, the drawer footer's transformDomainFormData, and the glossary handleSave — emit identical, backend-valid JSON.

Schema — additive, backward compatible. intakeForm.json gains formFields (with required per field); requiredFields is retained as a deprecated compatibility view that the backend keeps in sync via IntakeFormUtil, so existing API clients and stored rows keep working. A 1.13.3 post-data migration backfills formFields from requiredFields. Deleting a custom property now removes it from any intake form referencing it, instead of leaving a dangling field.

Alternative rejected: reusing PropertyValue.tsx (the entity-details editor) inside the create forms. It is antd + inline-edit oriented and would have broken in the react-aria drawers, so the shared logic was factored into utils instead of the components.

Tests:

Use cases covered

  • Creating a Data Product / Domain / Glossary Term with a hyperlink-cp property sends {url, displayText?} and succeeds (previously a 400)
  • An entityReference property configured for glossaryTerm lists glossary terms — not users — and submits {id, type: "glossaryTerm"}
  • integer/number/timestamp submit JSON numbers, enum submits an array, date/dateTime/time submit strings in the configured format
  • An admin can include a custom property in an intake form without making it required
  • Deleting a custom property removes it from intake forms that referenced it

Unit tests

  • I added unit tests for the new/changed logic.
  • UI (Jest, 255 passing): AddDomainFormExtensionFields.test.tsx, GlossaryTermIntakeFields.test.tsx, AddGlossaryTermForm.test.tsx (all new), plus AddDomainForm.test.tsx, CustomProperty.utils.test.ts, IntakeFormUtils.test.ts, PropertyValue.test.tsx
  • Backend (JUnit): IntakeFormUtilTest.java (new), IntakeFormValidatorTest.java
  • The regression assertions fail without the fix: fetchExtensionReferenceOptions asserts searchQuery is called with searchIndex: 'glossaryTerm' and never with USER/TEAM, and the serializer asserts the {url, displayText?} hyperlink shape.

Backend integration tests

  • I added integration tests in openmetadata-integration-tests/ for new/changed API endpoints.
  • IntakeFormResourceIT.java (+488 lines) — formFields/requiredFields round-trips, optional-field handling, and custom-property deletion cascading into intake forms.

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • I added Playwright E2E tests for UI changes.
  • playwright/e2e/Pages/IntakeForm.spec.ts — a Data Product test asserting the create payload for every property type (including an invalid-URL negative case), a Domain variant covering the shared form, and a Glossary Term test asserting create-time enforcement plus that intake fields are absent when editing.

Manual testing performed

  1. Ran the Jest suites above against the local tree — 255 tests pass.
  2. Ran the new Playwright describes against a local stack: the Data Product test exercised the reference, hyperlink, integer, number, enum, date, dateTime, time, timestamp and entityReferenceList fields end-to-end and asserted the create payload.
  3. npx tsc --noEmit is clean for the changed files; UI checkstyle (organize-imports → eslint --fix → prettier) and mvn spotless:check -pl openmetadata-service both pass.

Note for reviewers: my local E2E environment degraded partway through verification (a node_modules reinstall wiped Vite's dep cache) and a pre-existing test in this spec now fails identically at the sidebar step, so the final re-run of the multi-select-enum assertion could not be re-confirmed locally. That one locator was corrected from reading the component source — MULTI_SELECT renders as an Autocomplete combobox, not the Select button used by single-select enum — and follows the same pattern as the reference picker that does pass in this file. Worth a CI confirmation.

UI screen recording / screenshots:

Not attached — the change is verified by the Playwright payload assertions above. Happy to add a recording if reviewers want one.

Checklist:

  • I have read the CONTRIBUTING document.

  • My PR is linked to a GitHub issue via Fixes #30612 above.

  • I have commented on my code, particularly in hard-to-understand areas.

  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

  • I have added a test that covers the exact scenario we are fixing.

Greptile Summary

This PR expands intake forms to support optional fields and all custom-property types across Domain, Data Product, and Glossary Term creation.

  • Adds formFields while retaining and synchronizing the legacy requiredFields representation.
  • Backfills existing IntakeForm records through MySQL and PostgreSQL post-data migrations.
  • Adds shared custom-property serialization plus dedicated widgets for the React Aria and Ant Design form stacks.
  • Removes deleted custom properties from IntakeForms and adds backend, UI, integration, and Playwright coverage.

Confidence Score: 3/5

The PR is not yet safe to merge because the custom-property deletion cascade can dispatch IntakeForm lifecycle reactions before the enclosing Type update has committed, and its transaction atomicity remains unresolved.

The nested IntakeForm updater reacts immediately while execution is still inside the outer Type mutation, allowing subscribers to observe work that a later rollback or retry can invalidate; the nested JDBI transaction boundary also does not yet establish that the IntakeForm mutation and manually inserted event commit atomically with the initiating deletion.

Files Needing Attention: openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/IntakeFormRepository.java; openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TypeRepository.java; openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityRepository.java

Important Files Changed

Filename Overview
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/IntakeFormRepository.java Adds synchronized field representations and a versioned custom-property deletion cascade, but previously reported transaction and lifecycle concerns remain unresolved or outstanding.
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TypeRepository.java Integrates IntakeForm cleanup into custom-property deletion and resets membership work for transaction retries.
openmetadata-service/src/main/java/org/openmetadata/service/util/IntakeFormUtil.java Centralizes compatibility synchronization between formFields and requiredFields.
openmetadata-spec/src/main/resources/json/schema/governance/intakeForm.json Introduces optional-aware formFields while retaining the deprecated compatibility field.
openmetadata-ui/src/main/resources/ui/src/utils/CustomProperty.utils.ts Adds shared shape-aware serialization for intake-form custom-property values.
openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainFormExtensionFields.tsx Adds per-type custom-property controls for Domain and Data Product create forms.
openmetadata-ui/src/main/resources/ui/src/components/Glossary/AddGlossaryTermForm/GlossaryTermIntakeFields.component.tsx Adds intake-form custom-property controls to Glossary Term creation.
bootstrap/sql/migrations/native/1.13.3/postgres/postDataMigrationSQLScript.sql Backfills PostgreSQL IntakeForm rows from legacy required fields while guarding malformed values.
bootstrap/sql/migrations/native/1.13.3/mysql/postDataMigrationSQLScript.sql Backfills MySQL IntakeForm rows from legacy required fields while guarding malformed values.

Reviews (24): Last reviewed commit: "Merge branch 'main' into harshach/intake..." | Re-trigger Greptile

…ate forms

Intake-form custom properties were rendered by a private switch in
AddDomainForm that hardcoded entityReference to a user/team picker and
had cases only for enum/number/string. A property configured for
['glossaryTerm'] therefore listed users, hyperlink-cp fell through to a
plain text input, and every other type produced a payload shape the
backend rejects.

- Add AddDomainFormExtensionFields (react-aria/RHF) covering all custom
  property types for Create Domain / Data Product, driving the entity
  search from customPropertyConfig so allowed types are honored.
- Add GlossaryTermIntakeFields (antd) and wire intake forms into the
  Create Glossary Term modal, which had no intake support at all even
  though the backend enforces it on POST /v1/glossaryTerms.
- Centralize serialization in serializeExtensionValue so all submit
  paths emit backend-valid shapes (numbers coerced, enum wrapped in an
  array, hyperlink as {url, displayText?}, real EntityReference type).
- Let intake forms include optional fields: add formFields with a
  per-field required flag, keep requiredFields as a deprecated
  compatibility view, and backfill existing rows via migration.
- Remove a deleted custom property from intake forms instead of leaving
  a dangling field reference.
- Group intake custom properties under a "Custom Properties" section
  with a property-type badge, matching the bulk-edit inline editor.

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 29, 2026 05:12
@harshach
harshach requested review from a team, chirag-madlani and karanh37 as code owners July 29, 2026 05:12
@github-actions

github-actions Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels Jul 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ TypeScript Types Auto-Updated

The generated TypeScript types have been automatically updated based on JSON schema changes in this PR.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes intake-form custom property rendering/serialization across the Domain, Data Product, and Glossary Term create flows by introducing per-type widgets and a shared serializeExtensionValue helper, while also evolving the intake-form contract to support optional (included-but-not-required) fields via a new formFields array (with required per field) and keeping requiredFields as a deprecated compatibility view.

Changes:

  • Add formFields support end-to-end (schema, generated types, UI designer/UI list, backend validator/repository) while maintaining requiredFields as a deprecated compatibility field and backfilling it via migration.
  • Centralize custom property serialization (hyperlink/entityReference/enum/number/date/time/etc.) so create payloads match backend-expected shapes.
  • Add dedicated intake-field rendering for Glossary Term create (AntD modal stack) and Domain/Data Product create (react-aria/react-hook-form stack), plus tests (Jest/JUnit/IT) and updated i18n strings.

Reviewed changes

Copilot reviewed 59 out of 61 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
openmetadata-ui/src/main/resources/ui/src/utils/IntakeFormUtils.ts New helpers to resolve effective intake fields (formFields preferred, fallback to legacy requiredFields) and convert back to legacy required fields.
openmetadata-ui/src/main/resources/ui/src/utils/IntakeFormUtils.test.ts Unit tests for getIntakeFormFields, required-only views, and legacy conversion.
openmetadata-ui/src/main/resources/ui/src/utils/CustomProperty.utils.ts Adds shared extension serializer + helpers for reference search index, hyperlink URL validation, type badge display name, and Luxon date-time formatting/parsing.
openmetadata-ui/src/main/resources/ui/src/utils/CustomProperty.utils.test.ts Adds coverage for new serializer/helpers and date-time formatting edge cases.
openmetadata-ui/src/main/resources/ui/src/utils/CSV/CSVUtilsClassBase.tsx Reuses shared getCustomPropertyReferenceSearchIndex and getCustomPropertyTypeDisplayName (removes local duplication).
openmetadata-ui/src/main/resources/ui/src/pages/IntakeForms/IntakeFormsPage.tsx Lists formFields and shows required vs optional badges; requests formFields from API.
openmetadata-ui/src/main/resources/ui/src/pages/IntakeForms/IntakeFormDesignerModal.tsx Designer now supports “include” + “required” for custom properties; persists both formFields and legacy requiredFields.
openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json Updates helper copy to explain include vs required behavior.
openmetadata-ui/src/main/resources/ui/src/locale/languages/ar-sa.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/gl-es.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/ko-kr.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/mr-in.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/pr-pr.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-pt.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/sv-se.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/th-th.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/tr-tr.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-tw.json Translation update for include vs required helper copy.
openmetadata-ui/src/main/resources/ui/src/hooks/useGridEditController.ts Adds configurable rowIdKey (supports row objects without an id column for table custom properties).
openmetadata-ui/src/main/resources/ui/src/generated/governance/intakeForm.ts Generated type updates for new IntakeFormField and formFields; marks requiredFields as deprecated in docs.
openmetadata-ui/src/main/resources/ui/src/generated/api/governance/createIntakeForm.ts Generated API type updates to accept formFields (with deprecated requiredFields).
openmetadata-ui/src/main/resources/ui/src/constants/CustomProperty.constants.ts Adds Luxon mapping for microsecond date-time backend pattern.
openmetadata-ui/src/main/resources/ui/src/components/Glossary/AddGlossaryTermForm/GlossaryTermIntakeFields.component.tsx New AntD-based intake-form field renderer for Glossary Term create modal.
openmetadata-ui/src/main/resources/ui/src/components/Glossary/AddGlossaryTermForm/GlossaryTermIntakeFields.test.tsx Jest coverage for rendering and value/validation behavior across custom property types.
openmetadata-ui/src/main/resources/ui/src/components/Glossary/AddGlossaryTermForm/AddGlossaryTermForm.component.tsx Fetches intake form + custom properties in create mode; applies intake-required rules to native fields; serializes extension via shared helper.
openmetadata-ui/src/main/resources/ui/src/components/Glossary/AddGlossaryTermForm/AddGlossaryTermForm.interface.ts Adds extension?: Record<string, unknown> to form payload type.
openmetadata-ui/src/main/resources/ui/src/components/Glossary/AddGlossaryTermForm/AddGlossaryTermForm.test.tsx Jest coverage for create-mode intake fields and submit serialization (including optional fields).
openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainFormExtensionFields.utils.ts New RHF-safe keying + type→field-kind mapping for extension fields in react-aria form stack.
openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainFormExtensionFields.tsx New react-aria/react-hook-form intake-field renderer for Domain/Data Product create drawers and in-form create.
openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainFormExtensionFields.test.tsx Jest coverage for per-type widgets, reference search behavior, and helper utilities.
openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainForm.component.tsx Removes the old limited type→widget switch; wires in the new extension-fields component; serializes extension through shared helper and supports optional fields.
openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainForm.interface.ts Adds extensionDefinitions and extensionFormValues to carry definition-aware serialization across submit paths.
openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainForm.test.tsx Adds tests for new intake-field wiring and extension serialization/cleanup.
openmetadata-ui/src/main/resources/ui/src/components/common/CustomPropertyTypeBadge/CustomPropertyTypeBadge.component.tsx New reusable badge component for property type display.
openmetadata-ui/src/main/resources/ui/src/components/common/CustomPropertyTable/PropertyValue.tsx Uses shared Luxon parse/format helpers for date-time types.
openmetadata-ui/src/main/resources/ui/src/components/common/CustomPropertyTable/PropertyValue.test.tsx Extends tests for hyperlink behavior and date-time parsing/formatting wiring.
openmetadata-ui-core-components/src/main/resources/ui/src/components/base/input/input.tsx Adds step prop support to core Input to enable correct numeric behavior in new widgets.
openmetadata-spec/src/main/resources/json/schema/governance/intakeForm.json Schema adds formFields + intakeFormField definition; deprecates requiredFields.
openmetadata-spec/src/main/resources/json/schema/api/governance/createIntakeForm.json API schema adds formFields and deprecates requiredFields.
openmetadata-service/src/test/java/org/openmetadata/service/util/IntakeFormValidatorTest.java Adds coverage to ensure included-but-optional fields are not enforced.
openmetadata-service/src/test/java/org/openmetadata/service/util/IntakeFormUtilTest.java New unit tests for formFields/requiredFields synchronization and custom property removal behavior.
openmetadata-service/src/main/java/org/openmetadata/service/util/IntakeFormValidator.java Validates requiredness based on effective formFields (with legacy fallback) and skips optional included fields.
openmetadata-service/src/main/java/org/openmetadata/service/util/IntakeFormUtil.java New utility to compute effective form fields, synchronize legacy fields, and remove custom-property references.
openmetadata-service/src/main/java/org/openmetadata/service/resources/governance/IntakeFormResource.java Updates default fields selection to include formFields.
openmetadata-service/src/main/java/org/openmetadata/service/resources/governance/IntakeFormMapper.java Maps formFields and synchronizes legacy required fields on create/update.
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TypeRepository.java On custom property deletion, cascades removal from intake forms; refactors membership change application for updater retries.
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/IntakeFormRepository.java Synchronizes formFields/requiredFields on read/write; supports removing deleted custom properties; opts out of FQN-dependent cleanup.
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityRepository.java Adds shouldCleanupFqnDependents() hook to skip expensive prefix cleanup for repositories that don't need it.
bootstrap/sql/migrations/native/1.13.3/postgres/postDataMigrationSQLScript.sql Backfills formFields from legacy requiredFields for Postgres.
bootstrap/sql/migrations/native/1.13.3/mysql/postDataMigrationSQLScript.sql Backfills formFields from legacy requiredFields for MySQL.

Comment on lines +157 to +162
case 'integer':
case 'number':
case 'timestamp':
serializedValue = Number(raw);

break;
Comment on lines +190 to +196
case HYPERLINK_TYPE_CUSTOM_PROPERTY:
serializedValue = serializeHyperlink(raw);

break;
default:
serializedValue = raw;
}
Comment on lines +73 to +77
const interval = Object.fromEntries(
['start', 'end']
.filter((key) => !isEmptyExtensionValue(raw[key]))
.map((key) => [key, Number(raw[key])])
);
Copilot AI review requested due to automatic review settings July 29, 2026 05:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 59 out of 61 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (4)

openmetadata-ui/src/main/resources/ui/src/utils/CustomProperty.utils.ts:163

  • serializeExtensionValue converts integer/number/timestamp via Number(raw) but does not check for NaN. Invalid numeric inputs will serialize as NaN (JSON null), which can cause backend 400s or silent data loss.
    openmetadata-ui/src/main/resources/ui/src/utils/CustomProperty.utils.ts:80
  • serializeTimeInterval coerces start/end with Number(...) but doesn't guard against non-numeric inputs. If a field contains an invalid number, it will serialize to NaN (which becomes null in JSON), producing backend-invalid payloads that are hard to debug.
    openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/IntakeFormRepository.java:108
  • removeCustomPropertyField updates the IntakeForm by calling the low-level store(form, true), which bypasses the versioned EntityUpdater path (no version bump, no changeDescription, and no change-event stream entry). This can leave audit/version history inconsistent with the persisted JSON when custom properties are deleted.
  public void removeCustomPropertyField(String entityType, String propertyName) {
    String json = Entity.getCollectionDAO().intakeFormDAO().findByEntityType(entityType);
    if (json == null) {
      return;
    }
    IntakeForm form = JsonUtils.readValue(json, IntakeForm.class);
    if (!IntakeFormUtil.removeCustomPropertyField(form, propertyName)) {
      return;
    }
    form.setUpdatedAt(System.currentTimeMillis());
    store(form, true);
  }

openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TypeRepository.java:461

  • Custom-property deletion prunes IntakeForms via intakeFormRepository.removeCustomPropertyField(...), but that helper currently performs a direct store without versioning/events. Since this is triggered from a Type update, the cascade should ideally flow through a versioned IntakeForm update and attribute the change to the same updatedBy to keep history/event consumers consistent.
      if (Entity.hasEntityRepository(Entity.INTAKE_FORM)) {
        IntakeFormRepository intakeFormRepository =
            (IntakeFormRepository) Entity.getEntityRepository(Entity.INTAKE_FORM);
        intakeFormRepository.removeCustomPropertyField(updated.getName(), property.getName());
      }

Comment on lines 144 to +155
const normalizeExtensionForApi = (
extension: Record<string, unknown> | undefined
extension: Record<string, unknown> | undefined,
definitions?: Record<string, CustomProperty>,
extensionFormValues?: Record<string, unknown>
): Record<string, unknown> | undefined => {
if (!extension) {
if (!extension && !extensionFormValues) {
return extension;
}
const rawValues = { ...extension };
Object.entries(extensionFormValues ?? {}).forEach(([formKey, raw]) => {
rawValues[getExtensionPropertyNameFromFormKey(formKey)] = raw;
});
@github-actions

github-actions Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 65%
65.95% (77488/117478) 49.92% (46757/93661) 51.12% (14060/27502)

Copilot AI review requested due to automatic review settings July 29, 2026 15:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 59 out of 61 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/IntakeFormRepository.java:108

  • removeCustomPropertyField() directly calls store(form, true), which bypasses the EntityUpdater pipeline (version bump, changeDescription/audit history, and change-event publication). This can leave clients/subscribers with stale intake-form definitions after a custom property delete cascade. Consider performing a normal repository update (diff original vs updated) so versioning + events are emitted.
      return;
    }
    form.setUpdatedAt(System.currentTimeMillis());
    store(form, true);
  }

openmetadata-ui/src/main/resources/ui/src/utils/CustomProperty.utils.ts:103

  • getCustomPropertyReferenceSearchIndex() returns a comma-joined string cast to SearchIndex, but SearchIndex is an enum of single index names (no comma-separated values). This type assertion undermines type-safety and can leak invalid values into components typed as SearchIndex (e.g., DataAssetAsyncSelectListProps.searchIndex). Consider widening the return type (e.g., SearchIndex | SearchIndex[]) and updating call sites to pass arrays, letting searchAPI join them.

@github-actions

github-actions Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit d42382b4c34bcb392d16d405a6039c35e66f45db in Playwright run 30535145874, attempt 2.

✅ 1262 passed · ❌ 0 failed · 🟡 5 flaky · ⏭️ 66 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) 1h 21m 35s

⏱️ Max setup 3m 9s · max shard execution 20m 51s · max shard-job elapsed before upload 24m 26s · reporting 10s

🌐 189.45 requests/attempt · 2.23 app boots/UI scenario · 27.66% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 27.66% (convergence target: at most 15%).
  • Application boot ratio was 2.23 per UI scenario (2930 boots / 1316 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
🟡 Shard chromium-01 194 0 2 1 0 0
✅ Shard chromium-02 167 0 0 1 0 0
🟡 Shard chromium-03 192 0 1 54 0 0
✅ Shard chromium-04 168 0 0 0 0 0
🟡 Shard chromium-05 182 0 1 8 0 0
✅ Shard chromium-06 201 0 0 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
✅ Shard domain-isolation-01 14 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
🟡 Shard import-export-01 8 0 1 0 0 0
✅ Shard ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 3 0 0 0 0 0
✅ Shard search-01 10 0 0 0 0 0
✅ Shard search-rbac-01 27 0 0 2 0 0
🟡 5 flaky test(s) (passed on retry)
  • Pages/CustomProperties.spec.ts › Should display custom properties for apiEndpoint in right panel (shard chromium-01, 1 retry)
  • Pages/DomainUIInteractions.spec.ts › Add owner to data product via UI (shard chromium-01, 1 retry)
  • Features/Glossary/GlossaryPagination.spec.ts › should check for nested glossary term search (shard chromium-03, 1 retry)
  • Features/Glossary/GlossaryHierarchy.spec.ts › should move term with children to different glossary (shard chromium-05, 1 retry)
  • Pages/GlossaryImportExport.spec.ts › Glossary Bulk Import Export (shard import-export-01, 1 retry)

📦 Download artifacts

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

removeCustomPropertyField mutated the form and called store() directly,
skipping the version bump, updatedBy, changeDescription and change
event. Because the version stayed put, a client holding a pre-prune copy
could PUT it back and still pass the optimistic-lock check, silently
restoring the deleted field with no audit trail.

Route the prune through getUpdater(...).update() and attribute it to the
user who deleted the custom property. IntakeFormUpdater already records
formFields/requiredFields, so the cascade now produces a proper change
description. assertDeletedPropertyPruned asserts the version increment,
updatedBy and the recorded formFields change, which fails on the
store()-directly path.

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 29, 2026 15:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 59 out of 61 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

openmetadata-ui/src/main/resources/ui/src/utils/CustomProperty.utils.ts:104

  • getCustomPropertyReferenceSearchIndex can return a comma-joined value when multiple entity types are configured, but it’s typed as SearchIndex and uses as SearchIndex casts. This hides the fact that the value is not a valid SearchIndex enum member and makes it easy to pass an invalid type to consumers (e.g., components that type searchIndex as SearchIndex only). Consider changing the helper to return SearchIndex | SearchIndex[] (preferred) or string, and update call sites/prop types accordingly so multi-index usage is represented without unsafe casts.

…alue

Address PR review findings on the shared extension serializer and the
domain intake widgets:

- integer/number/timestamp and timeInterval bounds now emit only finite
  numbers, so a non-numeric value is omitted rather than POSTed as NaN
  (invalid JSON for the backend). The empty-bound check is kept ahead of
  the coercion because Number('') is 0, not NaN.
- table-cp is serialized explicitly and omitted when no row is populated,
  so an optional table no longer ships an empty {columns, rows: []}.
- MarkdownExtensionField seeds RichTextEditor from the current field
  value instead of always '', so a pre-populated form no longer renders
  an empty editor the user can overwrite by accident.
- Replace the hardcoded tw:gap-[6px] with the tw:gap-1.5 design token
  that the CI Tailwind audit maps it to.

Co-Authored-By: Claude <noreply@anthropic.com>
siddhant1
siddhant1 previously approved these changes Jul 30, 2026
karanh37
karanh37 previously approved these changes Jul 30, 2026
chirag-madlani
chirag-madlani previously approved these changes Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Will we need this migration to 2.0 as well?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not needed here, 1.13.3 will be executed for 2.0 as well.
Any migration in lower versions not executed will be executed in higher versions, so its fine

…rm spec

Commit 5ded29b intentionally removed the 'Custom Properties' Typography
heading from AddDomainFormExtensionFields. Remove the two toContainText
assertions that depended on it so the test matches the current component.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

…ty test

1. Date picker popup didn't close before the dateTime picker opened, so
   getByRole('button', { name: 'Today' }) resolved to 2 elements and
   the strict-mode locator threw. Wait for 'Today' to be hidden after
   each Apply click before opening the next picker.

2. Multi-enum second selection: pressing Escape returns focus to the
   combobox input; with menuTrigger="focus" the Autocomplete immediately
   reopens the dropdown, causing a re-render cycle that detaches the input
   before the next click lands. Click the name input to defocus and wait
   for the listbox to disappear before re-clicking the multiEnum input.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@gitar-bot

gitar-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 4 resolved / 4 findings

Refactors intake-form custom property rendering and serialization across domain, data product, and glossary creation flows to correctly support all data types and optional fields. Addresses previous findings regarding custom-property fetch payloads, entity updater versioning, table serialization trailing rows, and optional field error hints.

✅ 4 resolved
✅ Bug: Custom-property fetch failure reintroduces invalid extension payloads

📄 openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainFormExtensionFields.tsx:920-925 📄 openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainForm.component.tsx:386-395
When getCustomPropertiesByEntityType rejects, both create forms set customProperties=[] (customPropertiesLoaded=true) and still render the required extension fields. In AddDomainFormExtensionFields the missing definition falls back to a string widget (fallbackDefinition name:'string'), and on submit normalizeExtensionForApi/serializeExtensionValue can't type the value (extensionDefinitions is empty), so a required hyperlink/entityReference/number field is submitted as a bare string — exactly the 400 this PR fixes. It only triggers on the API error path (a toast is shown), so severity is low, but consider blocking submit or surfacing an inline error for required extension fields that lack a loaded definition rather than rendering an untyped text input.

✅ Quality: removeCustomPropertyField bypasses EntityUpdater (no version/audit/change event)

📄 openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/IntakeFormRepository.java:97-108
IntakeFormRepository.removeCustomPropertyField reads the raw JSON, mutates formFields/requiredFields, sets updatedAt and calls store(form, true) directly instead of going through the EntityUpdater. This skips the version increment, updatedBy, changeDescription and change-event emission that a normal update produces. Because the stored version is unchanged, a client that later PUTs the form with the previously-fetched (now stale) version will still pass optimistic-lock checks despite the silent content change, and no audit/change-event records the cascade. Consider routing the removal through the standard update path (createOrUpdate/EntityUpdater) so versioning and change history stay consistent.

✅ Edge Case: Table serialization keeps blank trailing rows in payload

📄 openmetadata-ui/src/main/resources/ui/src/utils/CustomProperty.utils.ts:90-91
serializeTableValue returns the whole raw object whenever hasPopulatedTableRows is true, so a table with a mix of populated and empty rows (e.g. rows: [{name:'orders'},{name:''}]) submits the blank rows too. The module already exposes filterPopulatedTableRows for exactly this; consider filtering rows before returning so only populated rows reach the backend. Low impact if the backend tolerates empty rows.

✅ Quality: Optional missing-definition field always renders an error hint

📄 openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainFormExtensionFields.tsx:929-938 📄 openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainFormExtensionFields.tsx:197-204
In MissingDefinitionField, error={fieldState.error?.message ?? (isRequired ? undefined : message)} forces the 'definition-unavailable' message into the error slot for optional fields even though there is no validation failure and submit is allowed. ExtensionFieldContainer then renders it via HintText isInvalid with aria-invalid=true, so an optional field that failed to load looks like a blocking error. Consider rendering the message as neutral/help text for the optional case instead of as an invalid error hint.

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

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

backend safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Data Product Intake Form: Hyperlink Custom Property UI sends incorrect payload format

8 participants