Skip to content

[2.1] Discover workflow node factories from the classpath so migrate builds distribution nodes (backport 2.1 #38133) - #38142

Merged
yan-3005 merged 1 commit into
2.1from
fix/discover-workflow-node-factories-2.1
Nov 18, 2026
Merged

yan-3005 merged 1 commit into
2.1from
fix/discover-workflow-node-factories-2.1

Conversation

@yan-3005

@yan-3005 yan-3005 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Backport of #38133 to 2.1. Companion Collate backport: open-metadata/openmetadata-collate#8694

migrate runs in its own process and never runs a distribution's server startup, where its workflow node factories were registered, so the 2.0.8 governance workflow redeploy could not build the Collate-only nodes (Redeployed 24 of 26 on Collate clusters). NodeFactoryRegistry now registers every NodeFactoryProvider listed in META-INF/services when it is first used, so every process builds them. A provider that cannot be loaded or asked is logged and skipped, and discovery logs when it stops at its error cap.

Same change as #38133 (its three commits squashed), decision record included.

On 2.1 this is what lets an upgrade from 2.0.7 or earlier redeploy the Collate workflows in the 2.0.8 step; a database already past that step does not run it again.

Type of change:

  • Improvement

Tests:

Unit tests

NodeFactoryRegistryTest (two discovery tests), run on this branch with NodeFactoryTest and NodeFactoryAIAutomationTest: Tests run: 12, Failures: 0, Errors: 0.

Backend integration tests

  • Not applicable (no backend API changes). Broader affected coverage (--scope full) is pending.

Manual testing performed

End-to-end migrate on this branch, fresh MySQL: migrated, started the server once to seed 23 governance workflows, stopped it, then removed the 2.0.8 change-log row, its data-migration identity and the redeploy-step marker so the 2.0.8 redeploy runs again, as on an upgrade from 2.0.7 or earlier. Control (Collate jar copy without the services file): [v208] Redeployed 21 of 23 with createAndRunAIAutomationTask is a Collate-only feature — handler not registered and policyAgentTask is a Collate-only feature — handler not registered. With this change: Registering workflow node factories from io.collate.governance.workflows.CollateWorkflowNodeProvider → [v208] Redeployed 23 of 23, no errors.

UI screen recording:

Not applicable — backend-only change.

Checklist:

NodeFactoryRegistry registers the factories of every NodeFactoryProvider
listed in META-INF/services when it is first used, so migrate builds the
nodes a distribution implements and a migration that redeploys workflows
covers them. Discovery skips a provider it cannot load or ask, and logs
when it stops at its error cap.
@yan-3005
yan-3005 requested a review from a team as a code owner November 18, 2026 14:53
@yan-3005
yan-3005 requested review from TeddyCr and removed request for a team November 18, 2026 14:53
@github-actions

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.

@gitar-bot

gitar-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Classpath discovery lets migrations build distribution-specific workflow nodes, changing which workflow definitions can be redeployed and persisted.

Backports the classpath-based discovery of workflow node factories so NodeFactoryRegistry registers every NodeFactoryProvider listed in META-INF/services on first use, letting migrate build distribution nodes in the 2.0.8 governance workflow redeploy. 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

@yan-3005 yan-3005 added the skip-pr-checks Bypass PR metadata validation check label Nov 18, 2026
@yan-3005
yan-3005 merged commit 877bbe4 into 2.1 Nov 18, 2026
46 of 50 checks passed
@yan-3005
yan-3005 deleted the fix/discover-workflow-node-factories-2.1 branch November 18, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants