Skip to content

Fix Error/Success Conditions not evaluated case. Fix 'Cancel' final s…#3110

Open
vasilchev wants to merge 2 commits into
eclipse-hawkbit:masterfrom
boschglobal:fix/rollout_groups
Open

Fix Error/Success Conditions not evaluated case. Fix 'Cancel' final s…#3110
vasilchev wants to merge 2 commits into
eclipse-hawkbit:masterfrom
boschglobal:fix/rollout_groups

Conversation

@vasilchev
Copy link
Copy Markdown
Contributor

@vasilchev vasilchev commented Jun 1, 2026

Error/Success Conditions skipped if no match, still group marked as finish and nextGroup is triggered

There is a bug in our Rollout  handling whenever Error/Success conditions are not met - and thus not executed, but All Actions have finished - group is marked as finished which leads to.

Error/Success Condition is not executed
Next scheduler run just starts nextGroup
 

Proposal:

If neither Error nor Success Condition/Action triggered but all Actions finished - execute success Action (no change in behavior, only fixes the issue when Success Action is PAUSE) - Only if Error Condition is met then mark group in ERROR state - otherwise consider it success (success action is triggered whenever either Success Condition or Group has finished)


If Action is deleted group percentage is not updated correctly -

we count assigned Targets
we count finished Actions
if we delete Actions, but target remain - percentage calculations is broken and could never be met in some cases (i.e. 100% success, on 5 targets, 5 Actions - but delete an Action -> 5 Targets with, 4 Success Actions -> this in theory is 100%, but not handled)
 

Proposal:

Option 1: Do nothing - this seems a corner case - Usually if user wants should "force-quit" the Action, not delete it.
Option 2: Count Actions not target (i.e. like Dynamic groups - else condition below)
Current impl:

private long countTargetsFrom(final JpaRolloutGroup rolloutGroup) {
    if (rolloutGroup.isDynamic()) {
        return countByActionsInRolloutGroup(rolloutGroup.getId());
    } else {
        return rolloutGroupManagement.countTargetsOfRolloutsGroup(rolloutGroup.getId());
    }
} 

Cancel result is not mapped to Error nor Success

Same percentage break whenever we have Cancelled Action. It is not considered neither as Error nor Success. This could also break Error/Success evaluation - i.e. skip Actions, triggerNext group
In case we have 5 Targets, 4 Actions Success, 1 Action Cancelled. on 

Success condition 100%, with PAUSE Success ACTION -> Success action is never executed as condition is not met, but yet triggerNextGroup 
Proposal:

Map Cancelled status to Error.

Success - means assignment successfully finished - i.e. DS Installed
Error - means assignment not installed - regardless of reason (Error / Cancelled)

vasilchev added 2 commits June 1, 2026 21:21
…tatus not mapped - now mapped to Error. Fix Delete Action does not update properly group count and percentage evaluation.

Signed-off-by: vasilchev <vasil.ilchev@bosch.com>
Signed-off-by: vasilchev <vasil.ilchev@bosch.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.

1 participant