Skip to content

feat(core)!: add ingestion mode management - #127

Open
RVANDO12 wants to merge 9 commits into
mainfrom
feat/ingestion/mode-management
Open

feat(core)!: add ingestion mode management#127
RVANDO12 wants to merge 9 commits into
mainfrom
feat/ingestion/mode-management

Conversation

@RVANDO12

@RVANDO12 RVANDO12 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

PR Description

What this PR Provides

  • Introduces the MappingAction enum to support granular ingestion modes (UPDATE_ENTITY, UPDATE_PROPERTIES, UPDATE_RELATIONS, DELETE).
  • Implements targeted property updates (UPDATE_PROPERTIES) that strictly preserve existing relationship edges.
  • Implements targeted relationship updates (UPDATE_RELATIONS) that strictly preserve existing scalar properties.
  • Adds event-driven hard deletion (DELETE) that gracefully cleans up parent relation references before removing the entity.
  • Enhances EntityDynamicMapping configuration to accept and validate the required action mode.

Fixes

  • fixes IPD-CORE Add ingestion mode management

Review

The reviewer must double-check these points:

  • The reviewer has tested the feature
  • The reviewer has reviewed the implementation of the feature
  • The documentation has been updated
  • The feature implementation respects the Technical Doc / ADR previously produced
  • The Pull Request title has a ! after the type/scope to identify the breaking
    change in the release note and ensure we will release a major version.

How to test

  • The initial state:
    Ensure you have a valid EntityTemplate deployed in back-end, and create an initial baseline Entity with both properties and relations populated.
    Set up a Webhook Connector targeting this template.
  • What and how to test:
  1. Send a webhook payload configured for UPDATE_PROPERTIES that alters a property (e.g., status).
  2. Send a webhook payload configured for UPDATE_RELATIONS that alters a relationship target array.
  3. Send a webhook payload configured for UPDATE_RELATIONS with an empty array [] for a specific relation.
  4. Send a webhook payload configured for DELETE.
  • Expected results:
  1. For step 1, a GET request should show the property updated while all original relations remain untouched.
  2. For step 2, a GET request should show the relation updated while all original properties remain untouched.
  3. For step 3, a GET request should show the relation successfully unlinked (cleared).
  4. For step 4, a GET request to the entity should return a 404 Not Found, and any parent entities that previously referenced it should no longer contain its ID in their relation arrays.

Breaking changes !

  • API JSON schema modification (existing resource / behavior)

Context of the Breaking Change

The API schema for configuring Webhook Connectors has been modified. The EntityDynamicMapping payload now requires an action field to dictate the mutation logic.

Result of the Breaking Change

Existing webhook mapping configurations must be migrated to include "action": "UPDATE_ENTITY" to retain their current default behavior (Full Merge).


@github-code-quality

github-code-quality Bot commented Aug 14, 2026

Copy link
Copy Markdown

Code Coverage Overview

Languages: Java

Java / code-coverage/jacoco

The overall coverage in commit 6afe4a6 in the feat/ingestion/mode-... branch is 91%. The coverage in commit f148be0 in the main branch is 90%.

Show a code coverage summary of the most impacted files.
File main f148be0 feat/ingestion/mode-... 6afe4a6 +/-
com/decathlon/i...ityService.java 98% 97% -1%
com/decathlon/i...ineAdapter.java 82% 81% -1%
com/decathlon/i...pingMapper.java 98% 98% 0%
com/decathlon/i...kErrorCode.java 100% 100% 0%
com/decathlon/i...uteBuilder.java 100% 100% 0%
com/decathlon/i...uteBuilder.java 100% 100% 0%
com/decathlon/i...MapperImpl.java 93% 94% +1%
com/decathlon/i...ingAdaptor.java 88% 89% +1%
com/decathlon/i...nProcessor.java 6% 100% +94%
com/decathlon/i...pingAction.java 0% 100% +100%

Updated August 19, 2026 15:38 UTC

@RVANDO12 RVANDO12 changed the title feat(core): add ingestion mode management feat!(core): add ingestion mode management Aug 14, 2026
@RVANDO12 RVANDO12 changed the title feat!(core): add ingestion mode management feat(core)!: add ingestion mode management Aug 14, 2026
…equires an action field.

feat(core): add ingestion mode management

feat(core): add ingestion mode management - fix sonar issue

feat(core): add ingestion mode management - fix sonar issue

feat(core): add ingestion mode management - fix swagger breaking change

feat(core): add ingestion mode management - fix swagger and useless code
@RVANDO12
RVANDO12 force-pushed the feat/ingestion/mode-management branch from 9e32ce7 to 9bdf2f6 Compare August 14, 2026 13:49
@sonarqubecloud

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants