Skip to content

feat(batch): prepare backend#1105

Merged
tom-rm-meyer-ISST merged 4 commits intofeat/1103-partner-update-batchfrom
feat/batch
Mar 7, 2026
Merged

feat(batch): prepare backend#1105
tom-rm-meyer-ISST merged 4 commits intofeat/1103-partner-update-batchfrom
feat/batch

Conversation

@tom-rm-meyer-ISST
Copy link
Copy Markdown
Contributor

@tom-rm-meyer-ISST tom-rm-meyer-ISST commented Mar 6, 2026

Description

Warning

This is not compilable. Due to size of pr I left out processing service implementation.

solves #1104

Provides:

  • entities PartnerDataUpdateBatchRun with PartnerDataUpdateBatchRun and respective datatypes
  • matching Dtos PartnerDataUpdateBatchRun with PartnerDataUpdateBatchRunDto
  • Repositories for both entities
  • Services for CRUD
  • Configuration in batch.partnerdataupdate.enabled, cron and retentiondays
    • all application.properties
    • local deployment
    • chart
  • Prepare Controller
    • ModelMapper with Config
    • SecurityConfig
  • liquibase changes
  • update of arc42 building block view

fix for missing attribute in MaterialPartnerRelation.toString()

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

  • DEPENDENCIES are up-to-date. Dash license tool. Committers can open IP issues for restricted libs.
  • Copyright and license header are present on all affected files (TRG 7.02
  • Documentation Notice are present on all affected files (TRG 7.07)
  • If helm chart has been changed, the chart version has been bumped to either next major, minor or patch level (compared to released chart).
  • Changelog updated (changelog.md) with PR reference and brief summary.
  • Frontend version bumped, if needed (frontend/package.json, frontend/package-lock.json)
  • Backend version bumped, if needed (backend/pom.xml)
  • Open API specification updated, if controllers have been changed (use python script scripts/generate_openapi_yaml.py with running customer backend)

@tom-rm-meyer-ISST tom-rm-meyer-ISST changed the base branch from main to feat/1103-partner-update-batch March 6, 2026 14:33
@tom-rm-meyer-ISST tom-rm-meyer-ISST marked this pull request as ready for review March 6, 2026 14:48
@tom-rm-meyer-ISST
Copy link
Copy Markdown
Contributor Author

@ReneSchroederLJ The tests fail due to not providing an implementation for the ...BatchProcessService that is handed with #1106

Copy link
Copy Markdown
Member

@ReneSchroederLJ ReneSchroederLJ left a comment

Choose a reason for hiding this comment

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

Overall great start for the feature. I've got some minor feedback to consider.


@NotNull
@Column(nullable = false)
private UUID partnerId;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You're adding a lot of the partner's properties directly to this entity instead of creating a ManyToOne relationship. do you have performance concerns in this regard? Also I would argue that partnerId, while internally used as key, is not really necessary information in this object.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reasons I considered:

  • performance (in Testimonial we already have 25 materials with each 4 information on at least a daily run) and loser coupling
  • relationship is commonly not used as this is a write once entity (like audit information) -> no real benefit in relation
  • eases handling a little

But you're right, if needed we can lookup with partnerBpnl. Removed that also from changelog.

/**
* Direction used across domains. INBOUND = partnerSuppliesFlag, OUTBOUND = partnerBuysFlag
*/
public enum DirectionEnum {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This enum is an exact duplication of the DirectionCharacteristic from ItemStockSamm, which has been used in various places before. It could make sense to move the existing one to common like we've done for ItemUnitEnumeration and ItemQuantityEntity. Arguably this should have happened before anyway.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Short discussion: Yes we should have it in common and used on other entities and dtos. My only concern is about the samm. Currently we used the autogeneration feature to some extent. I would not expect it to change really but as this is a definition that's only partially in our responsibility I would go for one DirectionCharacteristic for the samm and one DirectionEnum. Do you agree or shall I not overengineer and just go for it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

raised #1109 for refactoring. Not handled with this pr

"/parttypeinformation/**",
"/files/**"
"/files/**",
"/admin/**"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does it really make sense to use the /admin route for this feature specifically? Other previously available features are also fully admin only.

Copy link
Copy Markdown
Contributor Author

@tom-rm-meyer-ISST tom-rm-meyer-ISST Mar 6, 2026

Choose a reason for hiding this comment

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

Switched to batch

Copy link
Copy Markdown
Member

@ReneSchroederLJ ReneSchroederLJ left a comment

Choose a reason for hiding this comment

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

LGTM. good baseline for the feature

@tom-rm-meyer-ISST tom-rm-meyer-ISST merged commit c2fc6d0 into feat/1103-partner-update-batch Mar 7, 2026
10 of 12 checks passed
@tom-rm-meyer-ISST tom-rm-meyer-ISST deleted the feat/batch branch March 7, 2026 13:16
tom-rm-meyer-ISST added a commit that referenced this pull request Mar 9, 2026
* feat(batch): prepare backend (#1105)

* feat(batch): prepare backend

* chore: update changelog

* fix: incorporate review

* chore: add license header

* feat(batch): implement batch processing, controllers and tests (#1106)

* feat(batch): prepare backend

* chore: update changelog

* fix: incorporate review

* chore: add license header

* feat(batch): add controllers and tests

* chore: update changelog

* fix(PartnerDataUpdateBatchProcessServiceTest): switch mixed direction for DoS

* fix: incorporate changes from othter pr

* chore: cleanup and review incorp

* feat(batch): implement frontend, cleanup scheduler and documentation (#1107)

* feat(batch): prepare backend

* chore: update changelog

* fix: incorporate review

* chore: add license header

* feat(batch): add controllers and tests

* chore: update changelog

* fix(PartnerDataUpdateBatchProcessServiceTest): switch mixed direction for DoS

* fix: incorporate changes from othter pr

* feat(batch): add view to frontend

* fix: incorporate changes from batch

* feat: added retention scheduler

* docs(batch): document changes

* feat(batch): add sorting for batch runs

* chore: cleanup and review incorp

* refactor(BatchView): improve type safety

Co-authored-by: René Schröder <131770181+ReneSchroederLJ@users.noreply.github.com>

* fix: improve typization and fix pagination

* fix(PartnerDataUpdateBatchProcessServiceImpl): prevent parallel runs

* chore: bump vulnerabilities in frontend

---------

Co-authored-by: René Schröder <131770181+ReneSchroederLJ@users.noreply.github.com>

* docs(Migration_Guide.md): added duplicate exception note for operational data post endoints

* fix(values.yaml): removed linting issue trailing spaces

---------

Co-authored-by: René Schröder <131770181+ReneSchroederLJ@users.noreply.github.com>
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.

[Story] Prepare Batch Process to Update Partner Data

2 participants