Skip to content

[WIP] feat(workflows): batch entity processing — entityList-only for automated task nodes#26715

Open
yan-3005 wants to merge 2 commits intomainfrom
ram/workflow-improvements
Open

[WIP] feat(workflows): batch entity processing — entityList-only for automated task nodes#26715
yan-3005 wants to merge 2 commits intomainfrom
ram/workflow-improvements

Conversation

@yan-3005
Copy link
Contributor

Phase 1 of batch entity processing in governance workflows. All automated task nodes (checkEntityAttributesTask, setEntityAttributeTask, checkChangeDescriptionTask, rollbackEntityTask, sinkTask, dataCompletenessTask) now process a List of entity links via entityList exclusively. The relatedEntity fallback in getEntityList() is removed — batch nodes no longer have that path.

Key changes:

  • PeriodicBatchEntityTrigger (singleExecutionMode=false): each child process now receives global_entityList via ${entityToListMap[relatedEntity]}. FetchEntitiesImpl pre-builds entityToListMap (entity -> List.of(entity)) so the JUEL expression resolves without static class references.

  • Batch node impls (6 files): removed relatedEntity fallback from getEntityList() and the now-unused RELATED_ENTITY_VARIABLE import. entityList is the only input path.

  • BPMN builders: putIfAbsent(ENTITY_LIST_VARIABLE, GLOBAL_NAMESPACE) for all batch-capable nodes; relatedEntity is never added to inputNamespaceMap by builders.

  • v1130 migration (addEntityListToNamespaceMap): updated to also strip relatedEntity from batch node inputNamespaceMaps, covering both fresh upgrades (add entityList + remove relatedEntity) and instances that already ran the previous migration (entityList present, remove relatedEntity). Migration remains idempotent.

  • GlossaryApprovalWorkflow.json: removed relatedEntity from all 13 batch node inputNamespaceMaps. userApprovalTask nodes keep relatedEntity.

  • JSON schemas: entityList added to trigger output and batch node inputNamespaceMap/input definitions.

  • Integration tests: updated to reflect entityList-first structure across all batch-capable workflow node configurations.

Describe your changes:

Fixes

I worked on ... because ...

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.

…ted task nodes

Phase 1 of batch entity processing in governance workflows. All
automated task nodes (checkEntityAttributesTask, setEntityAttributeTask,
checkChangeDescriptionTask, rollbackEntityTask, sinkTask,
dataCompletenessTask) now process a List<String> of entity links via
entityList exclusively. The relatedEntity fallback in getEntityList()
is removed — batch nodes no longer have that path.

Key changes:

- PeriodicBatchEntityTrigger (singleExecutionMode=false): each child
  process now receives global_entityList via ${entityToListMap[relatedEntity]}.
  FetchEntitiesImpl pre-builds entityToListMap (entity -> List.of(entity))
  so the JUEL expression resolves without static class references.

- Batch node impls (6 files): removed relatedEntity fallback from
  getEntityList() and the now-unused RELATED_ENTITY_VARIABLE import.
  entityList is the only input path.

- BPMN builders: putIfAbsent(ENTITY_LIST_VARIABLE, GLOBAL_NAMESPACE) for
  all batch-capable nodes; relatedEntity is never added to inputNamespaceMap
  by builders.

- v1130 migration (addEntityListToNamespaceMap): updated to also strip
  relatedEntity from batch node inputNamespaceMaps, covering both fresh
  upgrades (add entityList + remove relatedEntity) and instances that
  already ran the previous migration (entityList present, remove relatedEntity).
  Migration remains idempotent.

- GlossaryApprovalWorkflow.json: removed relatedEntity from all 13 batch
  node inputNamespaceMaps. userApprovalTask nodes keep relatedEntity.

- JSON schemas: entityList added to trigger output and batch node
  inputNamespaceMap/input definitions.

- Integration tests: updated to reflect entityList-first structure across
  all batch-capable workflow node configurations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@yan-3005 yan-3005 self-assigned this Mar 24, 2026
@yan-3005 yan-3005 added safe to test Add this label to run secure Github workflows on PRs backend labels Mar 24, 2026
Copilot AI review requested due to automatic review settings March 24, 2026 07:23
Comment on lines +62 to +65
for (String entityLinkStr : entityList) {
MessageParser.EntityLink entityLink = MessageParser.EntityLink.parse(entityLinkStr);
rollbackEntity(execution, entityLink, updatedBy, workflowInstanceExecutionId);
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Bug: RollbackEntity overwrites execution variables in batch loop

When entityList contains multiple entities, rollbackEntity() is called in a loop and each iteration sets the same execution variables (rollbackAction, rollbackFromVersion, rollbackToVersion, rollbackEntityId, rollbackEntityType) via execution.setVariable(). Only the last entity's rollback metadata survives. Other batch implementations (DataCompletenessImpl, SinkTaskDelegate) correctly accumulate per-entity results into maps/lists.

Suggested fix:

Accumulate rollback results per entity into a Map<String, Object> (keyed by entity link), similar to how DataCompletenessImpl builds entityResults. Set a single aggregated variable after the loop completes.

Was this helpful? React with 👍 / 👎 | Reply gitar fix to apply this suggestion

"type": "array",
"items": { "type": "string" },
"default": ["relatedEntity"],
"default": ["relatedEntity", "entityList"],
Copy link

Choose a reason for hiding this comment

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

⚠️ Bug: dataCompletenessTask.json schema still requires relatedEntity

The JSON schema for dataCompletenessTask still has "required": ["relatedEntity"] in inputNamespaceMap and includes relatedEntity in the default input array. However, DataCompletenessImpl.java no longer reads relatedEntity — it exclusively uses ENTITY_LIST_VARIABLE. This mismatch means:

  1. Schema validation requires a field the code ignores
  2. additionalProperties: false combined with the required relatedEntity prevents creating workflows without it
  3. Inconsistent with peer schemas (rollbackEntityTask, setEntityAttributeTask, checkChangeDescriptionTask) which were updated to require entityList instead

Suggested fix:

Update the schema to match peers:
- Change `"required": ["relatedEntity"]` to `"required": ["entityList"]`
- Change default input to `["entityList"]`
- Remove the relatedEntity property from inputNamespaceMap

Was this helpful? React with 👍 / 👎 | Reply gitar fix to apply this suggestion

Comment on lines +67 to +78
private List<String> getEntityList(
Map<String, String> inputNamespaceMap, WorkflowVariableHandler varHandler) {
String entityListNamespace = inputNamespaceMap.get(ENTITY_LIST_VARIABLE);
if (entityListNamespace != null) {
Object entityListObj =
varHandler.getNamespacedVariable(entityListNamespace, ENTITY_LIST_VARIABLE);
if (entityListObj instanceof List) {
return (List<String>) entityListObj;
}
}
return List.of();
}
Copy link

Choose a reason for hiding this comment

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

💡 Quality: Duplicated getEntityList() method across 6 classes

The exact same getEntityList(inputNamespaceMap, varHandler) method is copy-pasted into CheckChangeDescriptionTaskImpl, CheckEntityAttributesImpl, DataCompletenessImpl, RollbackEntityImpl, SetEntityAttributeImpl, and SinkTaskDelegate. This is a maintenance hazard — any bug fix or behavior change needs to be applied in 6 places.

Suggested fix:

Extract getEntityList() into a shared utility method in WorkflowVariableHandler or a new helper class.

Was this helpful? React with 👍 / 👎 | Reply gitar fix to apply this suggestion

@github-actions
Copy link
Contributor

✅ TypeScript Types Auto-Updated

The generated TypeScript types have been automatically updated based on JSON schema changes in this PR.

@github-actions github-actions bot requested a review from a team as a code owner March 24, 2026 07:28
@gitar-bot
Copy link

gitar-bot bot commented Mar 24, 2026

Code Review ⚠️ Changes requested 0 resolved / 3 findings

Batch entity processing for automated task nodes introduces three issues that prevent approval: RollbackEntity overwrites execution variables in loop iterations causing data loss, dataCompletenessTask schema still requires relatedEntity despite the entityList-only design, and getEntityList() is duplicated across 6 classes reducing maintainability.

⚠️ Bug: RollbackEntity overwrites execution variables in batch loop

📄 openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/RollbackEntityImpl.java:62-65 📄 openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/RollbackEntityImpl.java:112-116 📄 openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/CheckEntityAttributesImpl.java:52-56 📄 openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/CheckChangeDescriptionTaskImpl.java:53-57

When entityList contains multiple entities, rollbackEntity() is called in a loop and each iteration sets the same execution variables (rollbackAction, rollbackFromVersion, rollbackToVersion, rollbackEntityId, rollbackEntityType) via execution.setVariable(). Only the last entity's rollback metadata survives. Other batch implementations (DataCompletenessImpl, SinkTaskDelegate) correctly accumulate per-entity results into maps/lists.

Suggested fix
Accumulate rollback results per entity into a Map<String, Object> (keyed by entity link), similar to how DataCompletenessImpl builds entityResults. Set a single aggregated variable after the loop completes.
⚠️ Bug: dataCompletenessTask.json schema still requires relatedEntity

📄 openmetadata-spec/src/main/resources/json/schema/governance/workflows/elements/nodes/automatedTask/dataCompletenessTask.json:92 📄 openmetadata-spec/src/main/resources/json/schema/governance/workflows/elements/nodes/automatedTask/dataCompletenessTask.json:99-102 📄 openmetadata-spec/src/main/resources/json/schema/governance/workflows/elements/nodes/automatedTask/dataCompletenessTask.json:108-109

The JSON schema for dataCompletenessTask still has "required": ["relatedEntity"] in inputNamespaceMap and includes relatedEntity in the default input array. However, DataCompletenessImpl.java no longer reads relatedEntity — it exclusively uses ENTITY_LIST_VARIABLE. This mismatch means:

  1. Schema validation requires a field the code ignores
  2. additionalProperties: false combined with the required relatedEntity prevents creating workflows without it
  3. Inconsistent with peer schemas (rollbackEntityTask, setEntityAttributeTask, checkChangeDescriptionTask) which were updated to require entityList instead
Suggested fix
Update the schema to match peers:
- Change `"required": ["relatedEntity"]` to `"required": ["entityList"]`
- Change default input to `["entityList"]`
- Remove the relatedEntity property from inputNamespaceMap
💡 Quality: Duplicated getEntityList() method across 6 classes

📄 openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/CheckChangeDescriptionTaskImpl.java:67-78 📄 openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/CheckEntityAttributesImpl.java:77-88 📄 openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/DataCompletenessImpl.java:137-149 📄 openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/RollbackEntityImpl.java:126-137 📄 openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/SetEntityAttributeImpl.java:79-90 📄 openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/sink/SinkTaskDelegate.java:297-308 📄 openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/DataCompletenessImpl.java:148 📄 openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/RollbackEntityImpl.java:136

The exact same getEntityList(inputNamespaceMap, varHandler) method is copy-pasted into CheckChangeDescriptionTaskImpl, CheckEntityAttributesImpl, DataCompletenessImpl, RollbackEntityImpl, SetEntityAttributeImpl, and SinkTaskDelegate. This is a maintenance hazard — any bug fix or behavior change needs to be applied in 6 places.

Suggested fix
Extract getEntityList() into a shared utility method in WorkflowVariableHandler or a new helper class.
🤖 Prompt for agents
Code Review: Batch entity processing for automated task nodes introduces three issues that prevent approval: RollbackEntity overwrites execution variables in loop iterations causing data loss, dataCompletenessTask schema still requires relatedEntity despite the entityList-only design, and getEntityList() is duplicated across 6 classes reducing maintainability.

1. ⚠️ Bug: RollbackEntity overwrites execution variables in batch loop
   Files: openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/RollbackEntityImpl.java:62-65, openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/RollbackEntityImpl.java:112-116, openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/CheckEntityAttributesImpl.java:52-56, openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/CheckChangeDescriptionTaskImpl.java:53-57

   When `entityList` contains multiple entities, `rollbackEntity()` is called in a loop and each iteration sets the same execution variables (`rollbackAction`, `rollbackFromVersion`, `rollbackToVersion`, `rollbackEntityId`, `rollbackEntityType`) via `execution.setVariable()`. Only the last entity's rollback metadata survives. Other batch implementations (DataCompletenessImpl, SinkTaskDelegate) correctly accumulate per-entity results into maps/lists.

   Suggested fix:
   Accumulate rollback results per entity into a Map<String, Object> (keyed by entity link), similar to how DataCompletenessImpl builds entityResults. Set a single aggregated variable after the loop completes.

2. ⚠️ Bug: dataCompletenessTask.json schema still requires relatedEntity
   Files: openmetadata-spec/src/main/resources/json/schema/governance/workflows/elements/nodes/automatedTask/dataCompletenessTask.json:92, openmetadata-spec/src/main/resources/json/schema/governance/workflows/elements/nodes/automatedTask/dataCompletenessTask.json:99-102, openmetadata-spec/src/main/resources/json/schema/governance/workflows/elements/nodes/automatedTask/dataCompletenessTask.json:108-109

   The JSON schema for dataCompletenessTask still has `"required": ["relatedEntity"]` in inputNamespaceMap and includes `relatedEntity` in the default input array. However, `DataCompletenessImpl.java` no longer reads `relatedEntity` — it exclusively uses `ENTITY_LIST_VARIABLE`. This mismatch means:
   1. Schema validation requires a field the code ignores
   2. `additionalProperties: false` combined with the required relatedEntity prevents creating workflows without it
   3. Inconsistent with peer schemas (rollbackEntityTask, setEntityAttributeTask, checkChangeDescriptionTask) which were updated to require `entityList` instead

   Suggested fix:
   Update the schema to match peers:
   - Change `"required": ["relatedEntity"]` to `"required": ["entityList"]`
   - Change default input to `["entityList"]`
   - Remove the relatedEntity property from inputNamespaceMap

3. 💡 Quality: Duplicated getEntityList() method across 6 classes
   Files: openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/CheckChangeDescriptionTaskImpl.java:67-78, openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/CheckEntityAttributesImpl.java:77-88, openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/DataCompletenessImpl.java:137-149, openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/RollbackEntityImpl.java:126-137, openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/SetEntityAttributeImpl.java:79-90, openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/sink/SinkTaskDelegate.java:297-308, openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/DataCompletenessImpl.java:148, openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/RollbackEntityImpl.java:136

   The exact same `getEntityList(inputNamespaceMap, varHandler)` method is copy-pasted into CheckChangeDescriptionTaskImpl, CheckEntityAttributesImpl, DataCompletenessImpl, RollbackEntityImpl, SetEntityAttributeImpl, and SinkTaskDelegate. This is a maintenance hazard — any bug fix or behavior change needs to be applied in 6 places.

   Suggested fix:
   Extract getEntityList() into a shared utility method in WorkflowVariableHandler or a new helper class.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Phase 1 of batch-entity processing for governance workflows: moves automated task nodes to consume entities exclusively via entityList (a list of entity-link strings), updates trigger/BPMN wiring to pass lists, and adds a v1130 migration to update stored workflow definitions accordingly.

Changes:

  • Extend trigger outputs and workflow event variable initialization to include entityList.
  • Update automated task node implementations and BPMN builders to read from entityList and to populate entityList in inputNamespaceMap by default.
  • Add v1130 data migration to inject entityList into workflow definitions and remove relatedEntity from batch-node namespace maps; update built-in workflow JSON and integration tests.

Reviewed changes

Copilot reviewed 30 out of 37 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
openmetadata-spec/src/main/resources/json/schema/governance/workflows/elements/triggers/periodicBatchEntityTrigger.json Updates trigger output schema to include entityList.
openmetadata-spec/src/main/resources/json/schema/governance/workflows/elements/triggers/eventBasedEntityTrigger.json Updates trigger output schema to include entityList.
openmetadata-spec/src/main/resources/json/schema/governance/workflows/elements/nodes/automatedTask/sinkTask.json Switches sink task schema inputs to entityList.
openmetadata-spec/src/main/resources/json/schema/governance/workflows/elements/nodes/automatedTask/setEntityAttributeTask.json Switches set-attribute task schema inputs to entityList.
openmetadata-spec/src/main/resources/json/schema/governance/workflows/elements/nodes/automatedTask/rollbackEntityTask.json Switches rollback task schema inputs to entityList.
openmetadata-spec/src/main/resources/json/schema/governance/workflows/elements/nodes/automatedTask/dataCompletenessTask.json Adds entityList to schema for completeness task.
openmetadata-spec/src/main/resources/json/schema/governance/workflows/elements/nodes/automatedTask/checkEntityAttributesTask.json Switches check-attributes task schema input to entityList and adds output list defaults.
openmetadata-spec/src/main/resources/json/schema/governance/workflows/elements/nodes/automatedTask/checkChangeDescriptionTask.json Switches check-change-description task schema input to entityList and adds output list defaults.
openmetadata-service/src/main/resources/json/data/governance/workflows/GlossaryApprovalWorkflow.json Updates built-in workflow to wire batch-capable nodes via entityList.
openmetadata-service/src/main/java/org/openmetadata/service/migration/utils/v1130/MigrationUtil.java Adds v1130 migration to add entityList to triggers and batch node namespace maps; strips relatedEntity for batch nodes; redeploys workflows.
openmetadata-service/src/main/java/org/openmetadata/service/migration/postgres/v1130/Migration.java Executes the new workflow migration during v1130 Postgres upgrade.
openmetadata-service/src/main/java/org/openmetadata/service/migration/mysql/v1130/Migration.java Executes the new workflow migration during v1130 MySQL upgrade.
openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/triggers/impl/FetchEntitiesImpl.java Builds entityToListMap so periodic trigger can pass per-entity entityList without static calls in JUEL.
openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/triggers/PeriodicBatchEntityTrigger.java Updates periodic trigger call-activity input mapping to always pass entityList (full batch or per-entity list) and adjusts loop cardinality handling.
openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/triggers/EventBasedEntityTrigger.java Ensures event-based trigger passes entityList into the called workflow.
openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/sink/SinkTaskDelegate.java Refactors sink delegate to always read entities from entityList.
openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/SetEntityAttributeImpl.java Changes set-attribute delegate to iterate over entityList.
openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/RollbackEntityImpl.java Changes rollback delegate to iterate over entityList and adds BPMN error handling + exception propagation.
openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/DataCompletenessImpl.java Changes completeness delegate to process entityList and emit per-band lists + results.
openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/CheckEntityAttributesImpl.java Changes attribute-check delegate to partition entities via entityList.
openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/impl/CheckChangeDescriptionTaskImpl.java Changes change-description-check delegate to partition entities via entityList.
openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/SetEntityAttributeTask.java Ensures BPMN builder injects entityList namespace mapping by default.
openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/RollbackEntityTask.java Ensures BPMN builder injects entityList namespace mapping by default.
openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/DataCompletenessTask.java Ensures BPMN builder injects entityList namespace mapping by default.
openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/CheckEntityAttributesTask.java Ensures BPMN builder injects entityList namespace mapping by default.
openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/CheckChangeDescriptionTask.java Ensures BPMN builder injects entityList namespace mapping by default.
openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/TriggerFactory.java Forces periodic triggers to run with singleExecutionMode=false.
openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/WorkflowEventConsumer.java Populates both relatedEntity and entityList in event-triggered workflow variables.
openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/Workflow.java Adds a constant for a “false entity list” variable name.
openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/WorkflowDefinitionResourceIT.java Updates integration tests to use entityList-based configs and expected outputs.
Comments suppressed due to low confidence (1)

openmetadata-spec/src/main/resources/json/schema/governance/workflows/elements/nodes/automatedTask/dataCompletenessTask.json:110

  • This schema still requires relatedEntity in inputNamespaceMap (and includes it in the default input), but the Java implementation now reads only from entityList and the v1130 migration strips relatedEntity from batch node inputNamespaceMaps. As written, migrated workflows will fail validation for dataCompletenessTask. Update the schema to make entityList the required input/namespace and remove or deprecate relatedEntity here to match runtime behavior.
    "input": {
      "type": "array",
      "items": { "type": "string" },
      "default": ["relatedEntity", "entityList"],
      "additionalItems": false,
      "minItems": 1
    },
    "inputNamespaceMap": {
      "type": "object",
      "properties": {
        "relatedEntity": {
          "type": "string",
          "default": "global"
        },
        "entityList": {
          "type": "string",
          "default": "global"
        }
      },
      "additionalProperties": false,
      "required": ["relatedEntity"]
    },

Comment on lines 23 to 28
case PERIODIC_BATCH_ENTITY -> new PeriodicBatchEntityTrigger(
workflow.getName(),
triggerWorkflowId,
(PeriodicBatchEntityTriggerDefinition) workflow.getTrigger(),
hasBatchModeNodes(workflow));
false);
};
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

PeriodicBatchEntityTrigger is now always constructed with singleExecutionMode=false. This removes the previous behavior that detected batch-mode sink nodes and forced loopCardinality("1") to avoid parallel executions (notably to prevent race conditions in sinks that commit externally). If batch-mode sinks still need single-execution semantics, reintroduce the detection or make single-execution an explicit trigger/workflow config rather than hardcoding false.

Copilot uses AI. Check for mistakes.
public static final String INGESTION_PIPELINE_ID_VARIABLE = "ingestionPipelineId";
public static final String RELATED_ENTITY_VARIABLE = "relatedEntity";
public static final String ENTITY_LIST_VARIABLE = "entityList";
public static final String FALSE_ENTITY_LIST_VARIABLE = "false_entityList";
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

FALSE_ENTITY_LIST_VARIABLE is introduced but not used anywhere in the codebase, and its snake_case form (false_entityList) doesn’t match the falseEntityList name used by the updated schemas/tests. Either remove this constant or rename/use it consistently across implementations and schema definitions.

Suggested change
public static final String FALSE_ENTITY_LIST_VARIABLE = "false_entityList";

Copilot uses AI. Check for mistakes.
Comment on lines +52 to +54
boolean result = !trueEntityList.isEmpty();
varHandler.setNodeVariable("true_" + ENTITY_LIST_VARIABLE, trueEntityList);
varHandler.setNodeVariable("false_" + ENTITY_LIST_VARIABLE, falseEntityList);
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

The node writes the false-branch list under the variable name false_entityList (via "false_" + ENTITY_LIST_VARIABLE), but the updated schema/tests expect falseEntityList. This mismatch will break downstream consumers that rely on the declared output variables. Align the runtime variable name with the schema (and consider keeping the old key as an alias if backward-compat is needed).

Suggested change
boolean result = !trueEntityList.isEmpty();
varHandler.setNodeVariable("true_" + ENTITY_LIST_VARIABLE, trueEntityList);
varHandler.setNodeVariable("false_" + ENTITY_LIST_VARIABLE, falseEntityList);
boolean result = !trueEntityList.isEmpty();
// Backward-compatible underscored variables (existing behavior)
varHandler.setNodeVariable("true_" + ENTITY_LIST_VARIABLE, trueEntityList);
varHandler.setNodeVariable("false_" + ENTITY_LIST_VARIABLE, falseEntityList);
// New camelCase variables aligned with workflow schema/tests
varHandler.setNodeVariable("trueEntityList", trueEntityList);
varHandler.setNodeVariable("falseEntityList", falseEntityList);

Copilot uses AI. Check for mistakes.

boolean result = !trueEntityList.isEmpty();
varHandler.setNodeVariable("true_" + ENTITY_LIST_VARIABLE, trueEntityList);
varHandler.setNodeVariable("false_" + ENTITY_LIST_VARIABLE, falseEntityList);
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

This task stores the false-branch entity list under false_entityList (via "false_" + ENTITY_LIST_VARIABLE), but the schema/integration tests reference falseEntityList. That means the advertised output variable will never be populated. Rename the output variable to match the schema (and optionally keep the old name as an additional output for compatibility).

Suggested change
varHandler.setNodeVariable("false_" + ENTITY_LIST_VARIABLE, falseEntityList);
varHandler.setNodeVariable("false_" + ENTITY_LIST_VARIABLE, falseEntityList);
varHandler.setNodeVariable("falseEntityList", falseEntityList);

Copilot uses AI. Check for mistakes.
"additionalItems": false,
"minItems": 1,
"maxItems": 1,
"maxItems": 2,
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

output.maxItems is set to 2, but workflows commonly include additional trigger outputs like updatedBy (e.g., GlossaryApprovalWorkflow now has 3 outputs: entityList, relatedEntity, updatedBy). With maxItems: 2 those workflows will fail schema validation. Consider removing the maxItems constraint (or increasing it / using a less restrictive validation approach).

Suggested change
"maxItems": 2,

Copilot uses AI. Check for mistakes.
"additionalItems": false,
"minItems": 1,
"maxItems": 1,
"maxItems": 2,
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

output.maxItems is 2, but periodic batch triggers often need to output additional variables (e.g., updatedBy) alongside entityList/relatedEntity. The integration tests build triggers with 3 outputs (relatedEntity, entityList, updatedBy), which would violate this schema. Relax or remove the maxItems restriction so custom trigger outputs remain valid.

Suggested change
"maxItems": 2,

Copilot uses AI. Check for mistakes.
Comment on lines 57 to +68
"inputNamespaceMap": {
"type": "object",
"properties": {
"entityList": {
"type": "string"
},
"relatedEntity": {
"type": "string",
"default": "global"
"type": "string"
}
},
"additionalProperties": false,
"required": ["relatedEntity"]
"additionalProperties": false
},
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

inputNamespaceMap for this batch-capable node no longer requires entityList (and still exposes relatedEntity). Since the implementation reads from entityList, allowing configs without entityList will validate but result in a runtime no-op. Make entityList required (with a default namespace like global) and drop relatedEntity from the schema if it's no longer supported.

Copilot uses AI. Check for mistakes.
@sonarqubecloud
Copy link

@github-actions
Copy link
Contributor

🟡 Playwright Results — all passed (20 flaky)

✅ 3110 passed · ❌ 0 failed · 🟡 20 flaky · ⏭️ 207 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 453 0 2 2
🟡 Shard 2 541 0 5 33
🟡 Shard 3 542 0 4 27
🟡 Shard 4 533 0 5 45
✅ Shard 5 511 0 0 67
🟡 Shard 6 530 0 4 33
🟡 20 flaky test(s) (passed on retry)
  • Features/CustomizeDetailPage.spec.ts › Dashboard - customization should work (shard 1, 1 retry)
  • Pages/UserCreationWithPersona.spec.ts › Create user with persona and verify on profile (shard 1, 1 retry)
  • Features/DataQuality/TestCaseIncidentPermissions.spec.ts › User with TEST_CASE.EDIT_ALL can see edit icon on incidents (shard 2, 1 retry)
  • Features/DataQuality/TestCaseResultPermissions.spec.ts › User with only VIEW cannot PATCH results (shard 2, 1 retry)
  • Features/ImpactAnalysis.spec.ts › Verify Upstream connections (shard 2, 1 retry)
  • Features/LandingPageWidgets/DomainDataProductsWidgets.spec.ts › Verify Widgets are having 0 count initially (shard 2, 2 retries)
  • Features/LandingPageWidgets/DomainDataProductsWidgets.spec.ts › Domain asset count should update when assets are added (shard 2, 2 retries)
  • Features/Permissions/DataProductPermissions.spec.ts › Data Product deny operations (shard 3, 1 retry)
  • Features/Permissions/GlossaryPermissions.spec.ts › Team-based permissions work correctly (shard 3, 1 retry)
  • Features/SettingsNavigationPage.spec.ts › should show navigation blocker when leaving with unsaved changes (shard 3, 1 retry)
  • Pages/Customproperties-part2.spec.ts › entityReferenceList shows item count, scrollable list, no expand toggle (shard 3, 1 retry)
  • Pages/DomainDataProductsRightPanel.spec.ts › Should display overview tab for data product (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Data Product announcement create, edit & delete (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Multiple consecutive domain renames preserve all associations (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Inactive Announcement create & delete (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Tag Add, Update and Remove (shard 4, 1 retry)
  • Pages/Login.spec.ts › Refresh should work (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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend 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