code: protected List<Long> closeObsoleteUpdateActions(final Collection<Long> targetsIds) {
  
          // Figure out if there are potential target/action combinations that
          // need to be considered for cancellation
          final List<JpaAction> activeActions = actionRepository
                  .findByActiveAndTargetIdInAndDistributionSetNotRequiredMigrationStep(targetsIds);
  
          return activeActions.stream().map(action -> {
              action.setStatus(Status.CANCELED);
              action.setActive(false);
  
              // document that the status has been retrieved
              actionStatusRepository.save(new JpaActionStatus(action, Status.CANCELED, System.currentTimeMillis(),
                      RepositoryConstants.SERVER_MESSAGE_PREFIX + "close obsolete action due to new update"));
              actionRepository.save(action);
  
              return action.getTarget().getId();
          }).collect(Collectors.toList());
  
      }
docs: Closes {@link Action}s that are no longer necessary without sending a
  hint to the controller.
  
  @param targetsIds
  to override {@link Action}s