Repository navigation
fix(workflows): backport Git sink batch recovery and workflow fixes to 2.0 - #35239
Conversation
…ing to 2.0 Backport of #34373 to 2.0, without its throughput changes. - A sink failure no failure branch handles ends the instance FAILURE instead of FINISHED. - POST /v1/governance/workflowInstances/{id}/terminate clears an instance and its Flowable rows, including one whose locks a crashed server still holds; for an executing job it records a stop request, honoured between sink sub-batches and by the periodic fetch loop. - One batch-sink execution handles at most 5000 entities. - Batch workflows evaluate conditions and apply actions to every entity of the batch, one entity after another; unsupported batch shapes are refused on save. - Git-sink workflows refuse query in their trigger on save, are deployed without it, and the builder leaves query out of the entity types. - Sink secrets are masked in REST and MCP responses and encrypted at rest when a Fernet key is configured. - Updates and redeploys keep a suspended workflow suspended; the sink form keeps the config fields it does not render; skipped counts reach the run summary. Left out: sub-batch prefetching, provider batch sizing and finishBatch, the parallel batch-node pool, and the commit signing key / fast push settings.
❌ 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 |
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
Code Review ✅ Approved🔴 High risk · Batch workflows now apply metadata actions to up to 5,000 entities per run, so a misconfigured workflow could alter many records. Backports Git sink batch recovery and sink secret masking to 2.0, fixing sink failures reported as success, stuck RUNNING instances via a new terminate endpoint, per-entity batch handling, Git-sink query trigger rejection, and masking of sink secrets. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledOptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
|
#35239 brought this test to 2.0 while this branch made SetGlossaryTermStatusImpl patch impersonating governance-bot, so the test still expected the plain four-argument patch. It now checks the same call main's copy of the test does.
…ted failures logged as errors [2.0] (#35302) * Fixes #35037: reject negative search pagination before it reaches the engine [2.0] Backport of #35039 and #35040. A negative from or size on the search endpoints is rejected with a 400 that names the parameter instead of failing in the search engine as a 500, and the UI no longer sends a negative offset. SearchResourceIT conflicted: 2.0 has neither the httpGetSearch helper nor the 400 mapping the old negative-offset test expected, so the new tests and helpers were added by hand. (cherry picked from commit 893cd1b) (cherry picked from commit e3914c5) * Fixes #35293: serve glossary CSV documentation for glossary-term import [2.0] The bulk import page asks /v1/csv/documentation/{entityType} for the type it imports into. For a glossary term that is glossaryTerm, which has no documentation file, so every request returned a 500 and was logged twice at ERROR. Glossary-term import already goes through GlossaryCsv, so glossaryTerm now gets the glossary's documentation. A type with no documentation returns a 404, and the FATAL log before the rethrow is gone. * Apply a workflow approval when the approver is not a reviewer [2.0] Anyone the task policy lets resolve an approval task, such as an admin or an owner, could approve a glossary term without being one of its reviewers. The workflow then set the status as that user, the reviewer check rejected it, and the failure was only logged: the task closed as Approved while the term stayed In Review. As on main since #34541, a status change the governance workflow makes, as or impersonating governance-bot, skips the reviewer check: the approval task already decided who may approve. Direct edits are still checked. SetGlossaryTermStatusImpl now writes impersonating governance-bot like the other workflow nodes, so its changes are recognised too. * Skip deleted alert recipients without logging an error [2.0] An alert can name a user or team that is deleted later. Every event for that alert logged the lookup failure at ERROR with a stack trace, although there is simply no one left to notify. A missing recipient is now skipped at DEBUG, as main does since #33967; any other lookup failure is still logged as an error. * Mock the 2.0 API client in the backported pagination test The pagination tests from #35040 mock ./axiosClient, which only exists on main. On 2.0 searchAPI imports its client from ./index, so the mock could not resolve and all 12 new cases failed. Mock ./index like the rest of the file. * Verify the impersonated status patch in BatchModeNodesTest #35239 brought this test to 2.0 while this branch made SetGlossaryTermStatusImpl patch impersonating governance-bot, so the test still expected the plain four-argument patch. It now checks the same call main's copy of the test does.



Describe your changes:
Backport of #34373 to
2.0, without its throughput changes. Fixes periodic batch workflows with a sink node on 2.0: sink failures reported as success, instances leftRUNNINGafter a server crash with no way to clear them, and batches that acted on their first entity only.FAILUREinstead ofFINISHED.POST /v1/governance/workflowInstances/{id}/terminate?reason=(admin only) clears an instance and its Flowable rows, including one whose job locks a crashed server still holds. For an executing job it records a stop request (202); the sink stops before its next sub-batch and the periodic fetch loop stops fetching. Open workflow-managed tasks of the instance are closed once the process is deleted.queryreturns 400; Git-sink workflows are deployed without a query trigger; the workflow builder leavesqueryout of the entity types.batchMode,retryConfig, ...); a sink write that throws fails only its entity; skipped counts reach the node outputs and summary.Not in this backport: sub-batch prefetching,
SinkProvider.nextBatchSize()/finishBatch(), the parallel batch-node pool, and the commit signing key / unsigned fast push settings. Sub-batches are fetched and written one after another, 100 entities each, as on 2.0 today.Migration. None in OSS. The 2.0.6 sink workflow migration (encrypting stored secrets, redeploying sink workflows, removing
queryfrom Git-sink triggers) runs from Collate, which ships the Git sink.Type of change:
Testing:
Run locally on this branch:
openmetadata-servicegovernance, secrets, workflow repositories and JSON patch testsTests run: 715, Failures: 0, Errors: 0; MCP toolsTests run: 292, Failures: 0, Errors: 0.WorkflowDefinitionResourceITtests (sink failure status, terminate, batch per entity, Git-sink query rule, secret masking and encryption, suspended kept) — MySQL + Elasticsearch18/0, PostgreSQL + OpenSearch18/0.92 passed.GitSinkTokenMask,NoOpWorkflowNodeConfig,WorkflowExecutionHistoryEntity,WorkflowOssRestrictions,TaskCustomFormWorkflow—34 passed.Known limits
failureHandledByBranchExpr,batchExecutionExprandbatchContinuingOutcomeExpr; older executors reject fields they don't declare. Drain jobs and stop older executors before deploying upgraded definitions.200.failure, so a workflow that routesfailureto further nodes runs them.Checklist:
🤖 Generated with Claude Code