Skip to content

Conversation

@strailov
Copy link
Contributor

Multi-Assignments feature removal

Removed all DMF related events - MultiActionAssignEven, MultiActionEvent, MultiActionCancelEvent (also related service events).
Renaming MultiAssignmentIsNotEnabledException to MultiAssignmentException (Thrown when multi-assignment is attampted in a single DeploymentRequest) .
Adapting tests accordingly.

Copy link
Contributor

@avgustinmm avgustinmm left a comment

Choose a reason for hiding this comment

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

LGTM, but since bigger commit - better have at least one more review

"hawkbit.server.error.repo.tenantConfigurationValueChangeNotAllowed",
"The requested tenant configuration value modification is not allowed."),
SP_MULTIASSIGNMENT_NOT_ENABLED(
SP_MULTIASSIGNMENT(
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't this now removed ?
"The requested operation requires multi assignment to be enabled" is not valid error anymore ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes but on one place - on deployment requests we still throw such exception (assignDistributionSets) - which was modified to multiAssignmentException. The idea behind is that we still may allow more than 1 assignment on a device - so I guess we should throw exception.

Copy link
Contributor

Choose a reason for hiding this comment

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

RepositoryProperties not used anymore - was used for getActionWeight that is now removed

private int getWeightConsideringDefault(final Action action) { return action.getWeight().orElse(repositoryProperties.getActionWeightIfAbsent()); }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will check that.

Copy link
Contributor

Choose a reason for hiding this comment

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

many unused imports after removals

*/
@Test
void getRollout() throws Exception {
enableMultiAssignments();
Copy link
Contributor

Choose a reason for hiding this comment

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

strange why it was needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Strange indeed - it was used on couple of places without need.

final boolean bypassWeightEnforcement = true;
final boolean multiAssignmentsEnabled = TenantConfigHelper.isMultiAssignmentsEnabled();
if (!bypassWeightEnforcement && multiAssignmentsEnabled && hasNoWeight) {
if (!bypassWeightEnforcement && hasNoWeight) {
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't this always false ?
bypassWeightEnforcment = true
if(!bypassWeightEnforcment && ..

It seems this validateWeight was used only when multiAssignemntEnabled= true ?

Copy link
Contributor

Choose a reason for hiding this comment

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

and hasWeight is actually not used ?

Copy link
Contributor

Choose a reason for hiding this comment

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

need to revise but it seems this was only needed when multiassignment was enabled, otherwise not

Copy link
Contributor Author

@strailov strailov Feb 3, 2026

Choose a reason for hiding this comment

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

Indeed - left it because there was a comment above - so I guess it was for a revision and decided not to change non relevant logic for the PR.

Signed-off-by: strailov <[email protected]>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 4, 2026

@strailov strailov merged commit c33156b into eclipse-hawkbit:master Feb 4, 2026
5 checks passed
@strailov strailov deleted the feature/remove_multiassignmets branch February 4, 2026 14:59
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.

3 participants