Repository navigation
[2.1] Discover workflow node factories from the classpath so migrate builds distribution nodes (backport 2.1 #38133) - #38142
Conversation
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.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
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 |
Code Review ✅ Approved 🟡 Medium riskClasspath 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 VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Backport of #38133 to
2.1. Companion Collate backport: open-metadata/openmetadata-collate#8694migrateruns 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 26on Collate clusters).NodeFactoryRegistrynow registers everyNodeFactoryProviderlisted inMETA-INF/serviceswhen 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.1this 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:
Tests:
Unit tests
NodeFactoryRegistryTest(two discovery tests), run on this branch withNodeFactoryTestandNodeFactoryAIAutomationTest:Tests run: 12, Failures: 0, Errors: 0.Backend integration tests
--scope full) is pending.Manual testing performed
End-to-end
migrateon 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 23withcreateAndRunAIAutomationTask is a Collate-only feature — handler not registeredandpolicyAgentTask 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:
REVIEW.md(one 🔴 on the decision record's scope, fixed; gitar and greptile findings fixed).