Skip to content

Fixes 30711: Data Contracts created via the UI are always set to Approved, bypassing Draft/review workflow - #31843

Draft
TeddyCr wants to merge 5 commits into
open-metadata:mainfrom
TeddyCr:ISSUE-30711
Draft

Fixes 30711: Data Contracts created via the UI are always set to Approved, bypassing Draft/review workflow#31843
TeddyCr wants to merge 5 commits into
open-metadata:mainfrom
TeddyCr:ISSUE-30711

Conversation

@TeddyCr

@TeddyCr TeddyCr commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes #30711

Every data contract created through the UI wizard was persisted as Approved, so contracts skipped the Draft/review workflow entirely. AddDataContract.handleSave hardcoded the status in the create payload and spread it after ...formValues, so nothing could override it:

await createContract({
  ...formValues,
  ...
  entityStatus: EntityStatus.Approved,   // spread AFTER ...formValues -> unoverridable
});

Compounding it, there was no status control anywhere in the UI — ContractDetailFormTab exposed only name, owners, and description. This PR adds a status select to the contract detail tab and sends the author's choice explicitly, defaulting to Draft.

Type of change:

  • Bug fix

High-level design:

Why the status is sent explicitly instead of just deleting the literal. This is the non-obvious part. The JSON Schema looks like it already defaults to Draft — dataContract.json and createDataContract.json both declare "default": "Draft" — but that default is inert. It sits beside a $ref, and jsonschema2pojo ignores a default sibling to $ref, resolving the referenced type/status.json default of Unprocessed instead. The generated CreateDataContract.java bears this out (EntityStatus.fromValue("Unprocessed")), and the repo's own DataContractResourceIT.testDataContractDefaultEntityStatus asserts UNPROCESSED. DataContractRepository.prepare() never sets the field and does not override setDefaultStatus.

So simply removing the hardcoded literal would have shipped every new contract as Unprocessed — arguably worse than the bug. The client has to send the status. I deliberately did not "fix" the schema default: correcting it means changing type/status.json, which would shift the default for every status-bearing entity in the product.

Which statuses are offered. Draft (default), In Review, Approved. Excluded:

  • Rejected — an outcome a reviewer produces by closing the approval task (DataContractRepository.postUpdate), not something you author into.
  • Archived / Deprecated — end-of-life states, meaningless for a contract being created.
  • Unprocessed — an internal sentinel that only leaks from the type/status.json default; it has no product meaning.

Keeping Approved on the list is deliberate: teams that rely on today's auto-approve behaviour can still get it in one click, it is simply no longer forced.

A regression this PR introduced, and fixed. ContractDetail.tsx hardcoded color="success" on the status pill. That was always correct while every UI-created contract was Approved — but defaulting to Draft makes the header render a green "success" pill reading "Draft" (verified in a browser: the Draft badge carried tw:bg-utility-success-50). Fixed by mapping status to colour.

The new getEntityStatusBadgeColor sits beside the existing getEntityStatusClass rather than replacing it. They cannot be unified cheaply: the existing helper returns the legacy StatusType consumed by the Ant Design StatusBadge, whereas this pill is the UntitledUI BadgeWithIcon, which takes BadgeColors. Unifying would mean either changing StatusBadge's contract — blast radius GlossaryTermTab, EntityStatusBadge, ChangeParentHierarchy, and lineage — or adapting through a 15-member enum of which 8 are irrelevant here. The new map mirrors the legacy palette in status-badge.less so a status looks the same in both stacks (approved green, draft/unprocessed yellow, in-review purple, rejected red, deprecated/archived grey). Both maps are Record<EntityStatus, …>, so TypeScript enforces exhaustiveness on each — the drift guard that actually matters.

It takes the enum's string values (`${EntityStatus}`) rather than the enum itself, because quicktype re-emits EntityStatus per entity with no shared module and TS string enums are nominal, so a caller holding the dataContract copy could not otherwise pass it.

Files changed

File Change
constants/DataContract.constants.ts DEFAULT_DATA_CONTRACT_STATUS + DATA_CONTRACT_AUTHORING_STATUS_OPTIONS — one source of truth for both the form and the payload
ContractDetailFormTab.tsx New entityStatus select, seeded initialValues?.entityStatus ?? Draft
AddDataContract.tsx entityStatus: formValues.entityStatus ?? DEFAULT_DATA_CONTRACT_STATUS
utils/EntityStatusUtils.ts EntityStatusBadgeColor / getEntityStatusBadgeColor
ContractDetailTab/ContractDetail.tsx Colour by status; renamed a duplicate data-testid

Scope notes. The edit path is untouched — it still patches via compare() from filteredContract, so an untouched status emits no /entityStatus op. The field is shared by create and edit, so edit gains a status control seeded from the contract's real status; that is intentional, since otherwise a Draft contract would have no UI path to Approved. Backend authorization is unchanged: EntityRepository.updateEntityStatus and checkUpdatedByReviewer still gate IN_REVIEW→APPROVED/REJECTED to reviewers. No schema change, no migration, no make generate.

Tests:

Use cases covered

  • Creating a contract through the wizard without touching Status persists Draft, not Approved
  • The author can pick In Review or Approved at creation and that choice is what persists
  • Only Draft / In Review / Approved are offered; Rejected / Archived / Deprecated / Unprocessed are not
  • Editing a contract without touching Status does not rewrite its status
  • Editing a contract and changing Status does patch it
  • The status badge renders the colour matching the status, not always green

Unit tests

  • I added unit tests for the new/changed logic.
  • Files added/updated:
    • src/components/DataContract/AddDataContract/AddDataContract.test.tsx (updated + 4 new)
    • src/components/DataContract/ContractDetailFormTab/ContractDetailFormTab.test.tsx (2 new)
    • src/components/DataContract/ContractDetailFormTab/ContractDetailFormTab.entityStatus.test.tsx (new file, 4 tests)
    • src/components/DataContract/ContractDetailTab/ContractDetail.test.tsx (7 new)
  • Coverage on changed files (measured, jest --coverage, % lines):
    • ContractDetailFormTab.tsx100%
    • ContractDetail.tsx97.1%
    • EntityStatusUtils.ts90.9% (the only uncovered line is the pre-existing isDeleted; the code added here is fully covered)
    • AddDataContract.tsx89.91%

Notes on what the tests actually assert, since it matters here:

  • Payload, not mock wiring — the AddDataContract tests assert the object handed to createContract (the HTTP boundary), which is exactly what the bug corrupted.
  • Real renderingContractDetailFormTab.entityStatus.test.tsx is a separate new file specifically so it can render the real Ant Design control; the pre-existing sibling stubs generateFormFields module-wide and cannot.
  • Patch-op guardshould not patch entityStatus when editing without touching the status inspects the real JSON-patch array, not expect.any(Array). Verified non-vacuous by injecting the regression, which produces {"op":"replace","path":"/entityStatus","value":"Draft"} and fails the guard.
  • Every new test was confirmed to fail before the fix and pass after.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • I added Playwright E2E tests for the UI change.
  • Files added/updated: openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataContracts.spec.ts (2 new tests)

There was previously zero Playwright coverage of entityStatus for contracts — the existing contract-status-card-item-* locators are validation status, not entity status. The new tests assert the POST /api/v1/dataContracts response body, not the form control that was just set, so they prove persistence rather than echoing input. They also assert the rendered badge's palette class.

Manual testing performed

  1. Started the stack and the UI; logged in as admin.
  2. Navigated to a table → Contract tab → Add Contract.
  3. Confirmed a Status field is present between Owners and Description, pre-selected to Draft.
  4. Opened the dropdown and confirmed exactly Draft, In Review, Approved — and that Rejected, Archived, Deprecated, Unprocessed are absent.
  5. Entered a title, left Status untouched, saved.
  6. With DevTools → Network open, confirmed the POST /api/v1/dataContracts response body contains "entityStatus": "Draft".
  7. Confirmed the header renders Status : Draft and the pill is yellow, not green (tw:bg-utility-warning-50).
  8. Created a second contract selecting Approved; confirmed the response body has "entityStatus": "Approved" and the pill is green.
  9. Created a third as In Review; confirmed the pill is purple.
  10. Edited an existing contract: confirmed the Status select shows its current status rather than defaulting to Draft, and that saving without touching Status leaves entityStatus unchanged (no /entityStatus op in the PATCH body).

UI screen recording / screenshots:

TODO — recording still to be attached. This is a UI change, so a recording is required. It is not attached yet and I have not fabricated one; the PR is opened as a draft until it is added.

What the recording should capture, in one continuous take:

  • the Add Contract form with Status pre-selected to Draft;
  • the open dropdown showing exactly the three authoring statuses;
  • the DevTools Network panel with the POST /api/v1/dataContracts response body visible showing "entityStatus": "Draft";
  • the resulting contract header reading Status : Draft with the yellow pill visible;
  • a second creation with Approved selected, again with the response body and the resulting Status : Approved header and green pill.

The Network panel is the load-bearing frame — the badge alone does not prove what was persisted. The two pills side by side are what demonstrate the colour fix.

Known gaps (disclosed, not fixed here):

  • The ODCS import modal is a second UI create path. ODCSImportModal.component.tsx also calls createContract, forwarding the parsed document verbatim with no entityStatus. So "UI-created contracts default to Draft" is true of the wizard only: importing an ODCS document that omits the field still lands as Unprocessed, while the wizard gives Draft. This is pre-existing and outside this issue's "creation wizard" framing, so it is deliberately left alone — a natural follow-up, and the fix would be the same one-line default. The badge-colour fix in this PR does already make that state render correctly (yellow) instead of green.
  • Picking "In Review" creates no approval task. There is no seeded BPMN governance workflow for dataContract, and DataContractRepository only ever closes approval tasks (they are created by CreateApprovalTaskImpl, which no dataContract workflow invokes). This is a pre-existing product gap rather than a regression, and it is not a hard trap — checkUpdatedByReviewer only restricts the transition when reviewers is non-empty — but the new dropdown does set an expectation the product does not yet fully meet.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: N/A — no schema change (and see the design section for why the existing inert schema default was deliberately left alone).
  • For UI changes: I attached a screen recording and/or screenshots above. — outstanding, see above
  • 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.

🤖 Generated with Claude Code

TeddyCr and others added 5 commits August 20, 2026 11:43
…ck the status

Contracts created through the UI wizard were always persisted as Approved:
AddDataContract spread `entityStatus: EntityStatus.Approved` after `...formValues`,
so nothing could override it, and the wizard exposed no status control at all.
New contracts therefore skipped the Draft/review workflow entirely.

Removing the literal alone is not enough. The schema's `"default": "Draft"` is
inert -- jsonschema2pojo ignores a `default` sibling to `$ref` and resolves the
referenced type/status.json default of `Unprocessed` instead -- and
DataContractRepository never sets the status itself. The client has to send it.

Add an `entityStatus` select to the contract detail tab and send the author's
choice, falling back to Draft. Only Draft / In Review / Approved are offered:
Rejected is an outcome a reviewer produces by closing the approval task,
Archived and Deprecated are end-of-life states, and Unprocessed is an internal
sentinel -- none is a state somebody authors a contract into. Keeping Approved
on the list means teams that relied on the old auto-approve are not regressed,
it is simply no longer forced.

The edit path is untouched: it still patches via compare() from filteredContract,
so an untouched status emits no patch op and existing statuses are preserved.

No new locale keys -- label.status/draft/in-review/approved already exist.

Fixes open-metadata#30711

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was no Playwright coverage of entityStatus for contracts at all -- the
existing contract-status-card-item-* locators are validation status, not the
entity status.

Assert the persisted value on the POST /api/v1/dataContracts response body plus
the rendered header badge, for both the untouched default (Draft) and an
explicitly picked status (Approved). Asserting the response rather than the
select proves persistence rather than echoing back the control just set.

The status label shares data-testid="contract-status-label" with the owners
label in ContractDetail, hence the text filter before walking up to the badge.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ys success

ContractDetail hardcoded color="success" on the status pill. That was invisible
while every UI-created contract was Approved, but defaulting new contracts to
Draft makes the header render a green success pill reading "Draft" -- verified in
a browser, the Draft badge carried tw:bg-utility-success-50. So this is a
regression introduced by the Draft default, not pre-existing.

Add EntityStatusBadgeColor / getEntityStatusBadgeColor next to the existing
EntityStatusClass / getEntityStatusClass. The existing helper could not be reused
as-is: it returns the legacy StatusType for the Antd StatusBadge, while this pill
is the UntitledUI BadgeWithIcon which takes BadgeColors. The new map mirrors the
legacy palette from status-badge.less rather than inventing a second one, so a
status looks the same in both stacks -- approved green, draft/unprocessed yellow,
in-review purple, rejected red, deprecated/archived grey. A missing status now
gets neutral grey rather than a confident green.

It takes the enum's string values rather than the enum itself because quicktype
re-emits EntityStatus per entity with no shared module and TS string enums are
nominal, so the dataContract copy could not otherwise be passed.

Also rename the Owners label's data-testid, which was a duplicate of
contract-status-label, and give the status row its own contract-status-card
testid mirroring contract-owner-card. Nothing referenced the duplicate, and it
lets the E2E assertions drop an xpath walk coupled to Typography's internal
wrapper that would have silently widened to the whole header row.

Fixes open-metadata#30711

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…s patches

The edit path never emitted an /entityStatus op, but nothing asserted it: the
existing "should call updateContract for existing contract with JSON patch"
checks only expect.any(Array), so it could not have caught a regression there.

Assert the contents of the real patch array instead, in both directions -- no
/entityStatus op when only an unrelated field changed (mockContract is Approved,
so a spurious op would silently rewrite a real status), and a correct
replace -> In Review when the author does change it. Proven non-vacuous by
injecting the default into the edit branch's patch target, which produces
replace /entityStatus -> Draft and fails the guard.

Also compare the rendered status options against the authoring list itself
rather than literal i18n keys, so renaming a key cannot fail that test for a
non-behavioural reason; which statuses the list may contain is still asserted
against EntityStatus values in ContractDetailFormTab.test.tsx.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… a noise useMemo

getEntityStatusBadgeColor('') returned '' rather than 'gray': an empty string
short-circuits && and is not nullish, so ?? never fired, and BadgeWithIcon would
have thrown on it. Unreachable through the type or the Java enum today, but the
helper is exported and shared, so make it total for any falsy input.

Drop the useMemo around entityStatusOptions. It maps a 3-element constant into
`fields`, which is itself rebuilt unmemoized on every render, so the memo bought
nothing and only added allocations -- frontend-performance.md calls that noise.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Aug 20, 2026
Comment on lines +88 to +101
{
label: t('label.status'),
id: 'entityStatus',
name: 'entityStatus',
type: FieldTypes.SELECT,
required: false,
props: {
'data-testid': 'contract-entity-status',
options: entityStatusOptions,
placeholder: t('label.please-select-entity', {
entity: t('label.status'),
}),
},
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Edge Case: Edit form can't represent statuses outside the 3 authoring options

The shared status select in ContractDetailFormTab is seeded via form.setFieldsValue with initialValues?.entityStatus (any of the 7 EntityStatus values), but its dropdown only offers Draft/InReview/Approved. When editing a contract whose current status is Rejected, Deprecated, Archived, or Unprocessed, the Ant Select shows the raw value with no matching option, and once the author opens the dropdown they cannot re-select the original state — there is no option representing it. Saving without touching the field is safe (compare emits no /entityStatus op), but any interaction forces the status into one of the three authoring values. Consider disabling/hiding the status control when the contract's current status is not in DATA_CONTRACT_AUTHORING_STATUS_OPTIONS, or appending the current status as a read-only option so it remains representable.

Was this helpful? React with 👍 / 👎

@gitar-bot

gitar-bot Bot commented Aug 20, 2026

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

Well-structured data contract creation and status workflow update with comprehensive unit and E2E test coverage. Consider handling statuses outside the three authoring options when rendering the edit form.

💡 Edge Case: Edit form can't represent statuses outside the 3 authoring options

📄 openmetadata-ui/src/main/resources/ui/src/components/DataContract/ContractDetailFormTab/ContractDetailFormTab.tsx:88-101 📄 openmetadata-ui/src/main/resources/ui/src/components/DataContract/ContractDetailFormTab/ContractDetailFormTab.tsx:115-120 📄 openmetadata-ui/src/main/resources/ui/src/constants/DataContract.constants.ts:35-42

The shared status select in ContractDetailFormTab is seeded via form.setFieldsValue with initialValues?.entityStatus (any of the 7 EntityStatus values), but its dropdown only offers Draft/InReview/Approved. When editing a contract whose current status is Rejected, Deprecated, Archived, or Unprocessed, the Ant Select shows the raw value with no matching option, and once the author opens the dropdown they cannot re-select the original state — there is no option representing it. Saving without touching the field is safe (compare emits no /entityStatus op), but any interaction forces the status into one of the three authoring values. Consider disabling/hiding the status control when the contract's current status is not in DATA_CONTRACT_AUTHORING_STATUS_OPTIONS, or appending the current status as a read-only option so it remains representable.

🤖 Prompt for agents
Code Review: Well-structured data contract creation and status workflow update with comprehensive unit and E2E test coverage. Consider handling statuses outside the three authoring options when rendering the edit form.

1. 💡 Edge Case: Edit form can't represent statuses outside the 3 authoring options
   Files: openmetadata-ui/src/main/resources/ui/src/components/DataContract/ContractDetailFormTab/ContractDetailFormTab.tsx:88-101, openmetadata-ui/src/main/resources/ui/src/components/DataContract/ContractDetailFormTab/ContractDetailFormTab.tsx:115-120, openmetadata-ui/src/main/resources/ui/src/constants/DataContract.constants.ts:35-42

   The shared status select in ContractDetailFormTab is seeded via form.setFieldsValue with initialValues?.entityStatus (any of the 7 EntityStatus values), but its dropdown only offers Draft/InReview/Approved. When editing a contract whose current status is Rejected, Deprecated, Archived, or Unprocessed, the Ant Select shows the raw value with no matching option, and once the author opens the dropdown they cannot re-select the original state — there is no option representing it. Saving without touching the field is safe (compare emits no /entityStatus op), but any interaction forces the status into one of the three authoring values. Consider disabling/hiding the status control when the contract's current status is not in DATA_CONTRACT_AUTHORING_STATUS_OPTIONS, or appending the current status as a read-only option so it remains representable.

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 👍 / 👎 | Powered by Gitar — free for open source

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 26 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 26 warning(s) across 5 changed file(s).

Count Rule
9 react-hooks/exhaustive-deps
9 @typescript-eslint/no-explicit-any
2 sonarjs/cyclomatic-complexity
2 @typescript-eslint/no-non-null-assertion
2 sonarjs/no-duplicate-string
1 jsx-a11y/label-has-for
1 jsx-a11y/control-has-associated-label
All findings
Location Rule Message
🟡 src/components/DataContract/AddDataContract/AddDataContract.tsx:90:39 sonarjs/cyclomatic-complexity {"message":"Function has a complexity of 13 which is greater than 10 authorized.","cost":3,"secondaryLocations":[{"line":90,"column":38,"endLine":90,"endColumn"
🟡 src/components/DataContract/AddDataContract/AddDataContract.tsx:278:6 react-hooks/exhaustive-deps React Hook useCallback has missing dependencies: 'onSave' and 't'. Either include them or remove the dependency array. If 'onSave' changes too often, find the p
🟡 src/components/DataContract/AddDataContract/AddDataContract.tsx:493:6 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/components/DataContract/AddDataContract/AddDataContract.tsx:536:6 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/components/DataContract/ContractDetailFormTab/ContractDetailFormTab.test.tsx:25:24 @typescript-eslint/no-explicit-any Unexpected any. Specify a different type.
🟡 src/components/DataContract/ContractDetailFormTab/ContractDetailFormTab.test.tsx:27:9 jsx-a11y/label-has-for Form label must have ALL of the following types of associated control: nesting, id
🟡 src/components/DataContract/ContractDetailFormTab/ContractDetailFormTab.test.tsx:28:9 jsx-a11y/control-has-associated-label A control must be associated with a text label.
🟡 src/components/DataContract/ContractDetailFormTab/ContractDetailFormTab.tsx:129:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'form'. Either include it or remove the dependency array.
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.test.tsx:267:45 @typescript-eslint/no-explicit-any Unexpected any. Specify a different type.
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.test.tsx:273:60 @typescript-eslint/no-explicit-any Unexpected any. Specify a different type.
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.test.tsx:283:60 @typescript-eslint/no-explicit-any Unexpected any. Specify a different type.
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.test.tsx:297:58 @typescript-eslint/no-explicit-any Unexpected any. Specify a different type.
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.test.tsx:307:67 @typescript-eslint/no-explicit-any Unexpected any. Specify a different type.
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.test.tsx:356:50 @typescript-eslint/no-explicit-any Unexpected any. Specify a different type.
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.test.tsx:388:54 @typescript-eslint/no-explicit-any Unexpected any. Specify a different type.
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.test.tsx:393:33 @typescript-eslint/no-explicit-any Unexpected any. Specify a different type.
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.test.tsx:1411:18 @typescript-eslint/no-non-null-assertion Forbidden non-null assertion.
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.test.tsx:1441:18 @typescript-eslint/no-non-null-assertion Forbidden non-null assertion.
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.tsx:121:4 sonarjs/cyclomatic-complexity {"message":"Function has a complexity of 16 which is greater than 10 authorized.","cost":6,"secondaryLocations":[{"line":121,"column":3,"endLine":121,"endColumn
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.tsx:175:21 sonarjs/no-duplicate-string Define a constant instead of duplicating this literal 4 times.
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.tsx:181:6 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.tsx:199:6 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.tsx:215:9 react-hooks/exhaustive-deps The 'handleRunNow' function makes the dependencies of useCallback Hook (at line 282) change on every render. To fix this, wrap the definition of 'handleRunNow'
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.tsx:331:28 sonarjs/no-duplicate-string Define a constant instead of duplicating this literal 3 times.
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.tsx:540:6 react-hooks/exhaustive-deps React Hook useMemo has unnecessary dependencies: 'handleRunNow' and 'validateLoading'. Either exclude them or remove the dependency array.
🟡 src/components/DataContract/ContractDetailTab/ContractDetail.tsx:556:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'fetchLatestContractResults'. Either include it or remove the dependency array.

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

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

Data Contracts created via the UI are always set to Approved, bypassing Draft/review workflow

1 participant