Skip to content

Commit

Permalink
Implement dryRun for validity scanner
Browse files Browse the repository at this point in the history
In this mode the recomputation is simply skipped.
  • Loading branch information
mederly committed Oct 11, 2021
1 parent 45bc429 commit ebbbe00
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.evolveum.midpoint.task.api.RunningTask;
import com.evolveum.midpoint.task.api.Task;
import com.evolveum.midpoint.task.api.TaskRunResult;
import com.evolveum.midpoint.task.api.TaskUtil;
import com.evolveum.midpoint.util.LocalizableMessageBuilder;
import com.evolveum.midpoint.util.exception.*;
import com.evolveum.midpoint.util.logging.Trace;
Expand Down Expand Up @@ -264,6 +265,10 @@ protected boolean handleObject(PrismObject<FocusType> object, RunningTask worker
private void reconcileFocus(PrismObject<FocusType> focus, Task workerTask, OperationResult result) throws SchemaException,
ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ObjectAlreadyExistsException,
ConfigurationException, PolicyViolationException, SecurityViolationException, PreconditionViolationException {
if (TaskUtil.isDryRun(workerTask)) {
LOGGER.debug("Skipping recomputing of {} because of dry run mode in {}", focus, workerTask);
return;
}
LOGGER.trace("Recomputing focus {}", focus);
// We want reconcile option here. There may be accounts that are in wrong activation state.
// We will not notice that unless we go with reconcile.
Expand Down

0 comments on commit ebbbe00

Please sign in to comment.