Skip to content

Move workflow feature to OSS side with restriction#27188

Merged
anuj-kumary merged 35 commits intomainfrom
workflow-oss
Apr 20, 2026
Merged

Move workflow feature to OSS side with restriction#27188
anuj-kumary merged 35 commits intomainfrom
workflow-oss

Conversation

@anuj-kumary
Copy link
Copy Markdown
Member

@anuj-kumary anuj-kumary commented Apr 9, 2026

Describe your changes:

Adds the governance workflow builder to OpenMetadata (OSS) where we can view workflow, read/edit node settings, and save configuration changes but cannot build or modify workflow structure no create, no delete, no drag-and-drop

Screen.Recording.2026-04-13.at.5.30.04.PM.mov

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • 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.

Summary by Gitar

  • Localization:
    • Standardized threshold-percentage translation keys across all supported languages to include the (%) suffix for consistency.

This will update automatically on new commits.

@anuj-kumary anuj-kumary self-assigned this Apr 9, 2026
@anuj-kumary anuj-kumary requested a review from a team as a code owner April 9, 2026 04:23
@anuj-kumary anuj-kumary added the safe to test Add this label to run secure Github workflows on PRs label Apr 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 9, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 61%
61.94% (60265/97284) 41.98% (31615/75292) 45% (9495/21098)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 9, 2026

🟡 Playwright Results — all passed (16 flaky)

✅ 3694 passed · ❌ 0 failed · 🟡 16 flaky · ⏭️ 89 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 478 0 3 4
🟡 Shard 2 654 0 2 7
🟡 Shard 3 663 0 2 1
🟡 Shard 4 647 0 1 27
✅ Shard 5 611 0 0 42
🟡 Shard 6 641 0 8 8
🟡 16 flaky test(s) (passed on retry)
  • Flow/Tour.spec.ts › Tour should work from help section (shard 1, 1 retry)
  • Flow/Tour.spec.ts › Tour should work from welcome screen (shard 1, 1 retry)
  • Pages/UserCreationWithPersona.spec.ts › Create user with persona and verify on profile (shard 1, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/ColumnBulkOperations.spec.ts › should open edit drawer when clicking on aggregate row (shard 2, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/UserProfileOnlineStatus.spec.ts › Should not show online status for inactive users (shard 3, 1 retry)
  • Pages/Customproperties-part2.spec.ts › entityReferenceList shows item count, scrollable list, no expand toggle (shard 4, 1 retry)
  • Pages/Glossary.spec.ts › Change glossary term hierarchy using menu options across glossary (shard 6, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Data Model (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (shard 6, 1 retry)
  • Pages/ODCSImportExport.spec.ts › Multi-object ODCS contract - object selector shows all schema objects (shard 6, 1 retry)
  • Pages/Users.spec.ts › Permissions for table details page for Data Consumer (shard 6, 1 retry)
  • Pages/Users.spec.ts › Check permissions for Data Steward (shard 6, 1 retry)
  • VersionPages/EntityVersionPages.spec.ts › Directory (shard 6, 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

@anuj-kumary anuj-kumary marked this pull request as ready for review April 9, 2026 12:46
@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 20, 2026

Code Review ⚠️ Changes requested 4 resolved / 6 findings

Moves workflow feature to OSS side with access restrictions, addressing double-submit vulnerability, test organization, and validation handling. Silent failure when trigger entityTypes is empty requires immediate fix before merge, and mapNodeTypeAndSubtype's label fallback matching should be reviewed for robustness.

⚠️ Bug: Silent failure when trigger entityTypes is empty

📄 openmetadata-ui/src/main/resources/ui/src/services/WorkflowValidationService.ts:84-89 📄 openmetadata-ui/src/main/resources/ui/src/services/WorkflowValidationService.ts:157-162

In buildTriggerConfig, when no entity types are available (lines 85-89 and 157-162), the code has empty comment blocks (// If no entity types provided, this will cause issues) but takes no action. The required entityTypes field is silently omitted from the trigger config, which will produce an invalid payload that the backend will reject. This should either throw a validation error early or log a warning, rather than silently producing a broken config.

Suggested fix
// Replace empty comment blocks with:
if (entityTypes.length === 0) {
  finalTriggerConfig.entityTypes = [];
  // Consider logging a warning or throwing a validation error
  console.warn('buildTriggerConfig: entityTypes is empty, trigger config may be invalid');
}
💡 Bug: mapNodeTypeAndSubtype uses label string matching as fallback

📄 openmetadata-ui/src/main/resources/ui/src/services/WorkflowValidationService.ts:272-286

In mapNodeTypeAndSubtype (lines 273-298), when nodeData.subType is not set, the code falls back to matching based on nodeData.label?.includes('Check'), includes('Set'), etc. This is fragile—if a user names a node 'Check inventory status' it would incorrectly match CheckEntityAttributesTask, or 'Reset values' would match SetEntityAttributeTask via 'Set'. Label-based type inference should not be used for determining node behavior.

✅ 4 resolved
Bug: GatewayNode useMemo missing data.name dependency

📄 openmetadata-ui/src/main/resources/ui/src/components/WorkflowDefinitions/Workflows/Nodes/GatewayNode/GatewayNode.tsx:16-18
In GatewayNode.tsx line 16-18, the isActive useMemo depends on selectedNode but is missing data.name from its dependency array. If data.name changes (e.g., after a node rename) while selectedNode stays the same reference, the memoized value will be stale and may show an incorrect active state.

Edge Case: Create workflow allows double-submit with no loading state

📄 openmetadata-ui/src/main/resources/ui/src/pages/WorkflowDefinitions/WorkflowsPage/WorkflowsPage.tsx:176-190
In WorkflowsPage.tsx handleModalSubmit, there's no loading/submitting state to disable the submit button during the async createWorkflowDefinition call. If the user clicks 'Create' multiple times quickly, duplicate workflows could be created. The button at line 366-383 has no isLoading or isDisabled prop tied to submission state.

Quality: E2E test file placed under Glossary directory instead of Workflows

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/WorkflowOssRestrictions.spec.ts:1
The new WorkflowOssRestrictions.spec.ts test is placed under playwright/e2e/Features/Glossary/ but it tests workflow capabilities and has nothing to do with Glossary. This will make test discovery confusing for future contributors. It should be placed under a Workflows (or similar) directory.

Bug: testWorkflow returns data even after validation failure

📄 openmetadata-ui/src/main/resources/ui/src/services/WorkflowValidationService.ts:606-620
In testWorkflow, the validateWorkflowDefinition API call is wrapped in a try/catch that shows an error toast on failure, but the function unconditionally returns backendReadyJSON on line 621 regardless of whether validation succeeded or failed. This means callers receive what appears to be a successful result even when server-side validation rejected the workflow, masking errors and potentially allowing the user to proceed with an invalid workflow definition.

🤖 Prompt for agents
Code Review: Moves workflow feature to OSS side with access restrictions, addressing double-submit vulnerability, test organization, and validation handling. Silent failure when trigger entityTypes is empty requires immediate fix before merge, and mapNodeTypeAndSubtype's label fallback matching should be reviewed for robustness.

1. ⚠️ Bug: Silent failure when trigger entityTypes is empty
   Files: openmetadata-ui/src/main/resources/ui/src/services/WorkflowValidationService.ts:84-89, openmetadata-ui/src/main/resources/ui/src/services/WorkflowValidationService.ts:157-162

   In `buildTriggerConfig`, when no entity types are available (lines 85-89 and 157-162), the code has empty comment blocks (`// If no entity types provided, this will cause issues`) but takes no action. The required `entityTypes` field is silently omitted from the trigger config, which will produce an invalid payload that the backend will reject. This should either throw a validation error early or log a warning, rather than silently producing a broken config.

   Suggested fix:
   // Replace empty comment blocks with:
   if (entityTypes.length === 0) {
     finalTriggerConfig.entityTypes = [];
     // Consider logging a warning or throwing a validation error
     console.warn('buildTriggerConfig: entityTypes is empty, trigger config may be invalid');
   }

2. 💡 Bug: mapNodeTypeAndSubtype uses label string matching as fallback
   Files: openmetadata-ui/src/main/resources/ui/src/services/WorkflowValidationService.ts:272-286

   In `mapNodeTypeAndSubtype` (lines 273-298), when `nodeData.subType` is not set, the code falls back to matching based on `nodeData.label?.includes('Check')`, `includes('Set')`, etc. This is fragile—if a user names a node 'Check inventory status' it would incorrectly match `CheckEntityAttributesTask`, or 'Reset values' would match `SetEntityAttributeTask` via 'Set'. Label-based type inference should not be used for determining node behavior.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants