Introduce soft deleted list option for soft deletable entities#3093
Merged
strailov merged 13 commits intoJun 8, 2026
Merged
Conversation
Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
avgustinmm
reviewed
May 26, 2026
Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
avgustinmm
requested changes
Jun 4, 2026
Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
avgustinmm
reviewed
Jun 8, 2026
avgustinmm
approved these changes
Jun 8, 2026
Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
soft_deleted_modequery parameter to listing REST endpointsSummary
Introduces a
soft_deleted_modefilter parameter to all soft-deletable entity listing endpoints, allowing API consumers to query soft-deleted entities that were previously hidden from listing results.Motivation
Soft-deleted entities (Distribution Sets, Software Modules, their Types, and Rollouts) were previously only accessible by direct ID lookup. There was no way to list or search them via the REST API, making it difficult for UI and integrations to display or manage deleted resources.
Changes
New API contract:
SoftDeletedModeenum (only_soft_deleted,exclude_not_soft_deleted,include_soft_deleted) with safefromValue()parsingSoftDeletableRepositoryManagementinterface extendingRepositoryManagementwithfindAll(SoftDeletedMode, Pageable)andfindByRsql(String, SoftDeletedMode, Pageable)count(SoftDeletedMode)added toRepositoryManagementwith fallback for non-soft-deletable entitiesAffected REST endpoints:
GET /rest/v1/distributionsetsGET /rest/v1/distributionsettypesGET /rest/v1/softwaremodulesGET /rest/v1/softwaremoduletypesGET /rest/v1/rollouts(compact mode only; full mode intentionally excluded)Mutation guards:
update,lock,unlock,invalidate,assignTag,unassignTagnow reject operations on soft-deleted entities withDeletedExceptionImplementations:
JpaDistributionSetManagement— refactoredfindByRsqlto support deleted filter while preserving legacycompletefield handlingJpaSoftwareModuleManagement,JpaSoftwareModuleTypeManagement,JpaDistributionSetTypeManagement— addedfindAll/findByRsqlwith soft-delete filtering and update guardsJpaRolloutManagement— addedfindAll/findByRsqlwithSoftDeletedFilterAbstractJpaRepositoryManagementdue to that some entities are not soft-deletable by definition. So the current approach may have some duplications withfindAllorfindByRsqlimplementations but seems with more clear architecture approach and distinguish those entities.AbstractJpaRepositoryManagement→AbstractJpaRepositoryWithMetadataManagement- Would need two variants (with/without metadata) or force unrelated coupling. Not worth the complexity. Decided to override the updates for each entity which is easy to review, no risk for other entities and straightforward .