Fix force quit actions to explicitly handle 0 active actions (#3004)
* Fix force quit actions to explicitly handle 0 active actions Signed-off-by: strailov <Stanislav.Trailov@bosch.io> * Fix dynamic rollout behaviour when using Postgres Signed-off-by: strailov <Stanislav.Trailov@bosch.io> --------- Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
This commit is contained in:
committed by
GitHub
parent
f9bb49d33e
commit
f6cb143283
@@ -561,6 +561,10 @@ public class JpaRolloutManagement implements RolloutManagement {
|
||||
.getContent();
|
||||
log.info("Found {} active actions for rollout {}", actions.size(), rollout.getId());
|
||||
|
||||
if (actions.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
storeActionsAndStatuses(actions, Action.Status.CANCELED);
|
||||
|
||||
// find next active actions - filter by targetId list and isActive
|
||||
|
||||
@@ -28,6 +28,7 @@ import jakarta.persistence.NamedAttributeNode;
|
||||
import jakarta.persistence.NamedEntityGraph;
|
||||
import jakarta.persistence.NamedEntityGraphs;
|
||||
import jakarta.persistence.OneToMany;
|
||||
import jakarta.persistence.OrderBy;
|
||||
import jakarta.persistence.Table;
|
||||
import jakarta.persistence.Transient;
|
||||
import jakarta.validation.constraints.Max;
|
||||
@@ -64,6 +65,7 @@ import org.eclipse.hawkbit.repository.model.TotalTargetCountStatus;
|
||||
public class JpaRollout extends AbstractJpaNamedEntity implements Rollout, EventAwareEntity {
|
||||
|
||||
@OneToMany(targetEntity = JpaRolloutGroup.class, fetch = FetchType.LAZY, cascade = { CascadeType.REMOVE }, mappedBy = "rollout")
|
||||
@OrderBy("id ASC")
|
||||
private List<JpaRolloutGroup> rolloutGroups = new ArrayList<>();
|
||||
|
||||
@Setter
|
||||
|
||||
Reference in New Issue
Block a user