Code review comment: _Maybe_ INFO, why would there be a warning for something that is expected and not a problem?

Code under review:
void converge() {
        final Optional<ContainerNodeSpec> nodeSpecOptional = nodeRepository.getContainerNodeSpec(hostname);

        
        if (!nodeSpecOptional.isPresent() && expectNodeNotInNodeRepo) return;

        final ContainerNodeSpec nodeSpec = nodeSpecOptional.orElseThrow(() ->
                new IllegalStateException(String.format("Node '%s' missing from node repository.", hostname)));
        expectNodeNotInNodeRepo = false;


        Optional<Container> container = getContainer();
        if (!nodeSpec.equals(lastNodeSpec)) {
            addDebugMessage("Loading new node spec: " + nodeSpec.toString());
            lastNodeSpec = nodeSpec;

            
            
            
            if (container.isPresent()) {
                storageMaintainer.writeMetricsConfig(containerName, nodeSpec);
            }
        }

        switch (nodeSpec.nodeState) {
            case ready:
            case reserved:
            case parked:
            case failed:
                removeContainerIfNeededUpdateContainerState(nodeSpec, container);
                updateNodeRepoWithCurrentAttributes(nodeSpec);
                break;
            case active:
                storageMaintainer.handleCoreDumpsForContainer(containerName, nodeSpec, false);

                storageMaintainer.getDiskUsageFor(containerName)
                        .map(diskUsage -> (double) diskUsage / BYTES_IN_GB / nodeSpec.minDiskAvailableGb)
                        .filter(diskUtil -> diskUtil >= 0.8)
                        .ifPresent(diskUtil -> storageMaintainer.removeOldFilesFromNode(containerName));

                scheduleDownLoadIfNeeded(nodeSpec);
                if (isDownloadingImage()) {
                    addDebugMessage("Waiting for image to download " + imageBeingDownloaded.asString());
                    return;
                }
                container = removeContainerIfNeededUpdateContainerState(nodeSpec, container);
                if (! container.isPresent()) {
                    storageMaintainer.handleCoreDumpsForContainer(containerName, nodeSpec, false);
                    startContainer(nodeSpec);
                }

                runLocalResumeScriptIfNeeded();
                
                
                
                
                
                
                
                
                
                
                updateNodeRepoWithCurrentAttributes(nodeSpec);
                logger.info("Call resume against Orchestrator");
                orchestrator.resume(hostname);
                break;
            case inactive:
                removeContainerIfNeededUpdateContainerState(nodeSpec, container);
                updateNodeRepoWithCurrentAttributes(nodeSpec);
                break;
            case provisioned:
                nodeRepository.markAsDirty(hostname);
                break;
            case dirty:
                removeContainerIfNeededUpdateContainerState(nodeSpec, container);
                logger.info("State is " + nodeSpec.nodeState + ", will delete application storage and mark node as ready");
                storageMaintainer.cleanupNodeStorage(containerName, nodeSpec);
                updateNodeRepoWithCurrentAttributes(nodeSpec);
                nodeRepository.markNodeAvailableForNewAllocation(hostname);
                expectNodeNotInNodeRepo = true;
                break;
            default:
                throw new RuntimeException("UNKNOWN STATE " + nodeSpec.nodeState.name());
        }
    }

Line commented on: if (!nodeSpecOptional.isPresent() && expectNodeNotInNodeRepo) return;

Revised code:
void converge() {
        final Optional<ContainerNodeSpec> nodeSpecOptional = nodeRepository.getContainerNodeSpec(hostname);

        
        if (!nodeSpecOptional.isPresent() && expectNodeNotInNodeRepo) return;

        final ContainerNodeSpec nodeSpec = nodeSpecOptional.orElseThrow(() ->
                new IllegalStateException(String.format("Node '%s' missing from node repository.", hostname)));
        expectNodeNotInNodeRepo = false;


        Optional<Container> container = getContainer();
        if (!nodeSpec.equals(lastNodeSpec)) {
            addDebugMessage("Loading new node spec: " + nodeSpec.toString());
            lastNodeSpec = nodeSpec;

            
            
            
            if (container.isPresent()) {
                storageMaintainer.writeMetricsConfig(containerName, nodeSpec);
            }
        }

        switch (nodeSpec.nodeState) {
            case ready:
            case reserved:
            case parked:
            case failed:
                removeContainerIfNeededUpdateContainerState(nodeSpec, container);
                updateNodeRepoWithCurrentAttributes(nodeSpec);
                break;
            case active:
                storageMaintainer.handleCoreDumpsForContainer(containerName, nodeSpec, false);

                storageMaintainer.getDiskUsageFor(containerName)
                        .map(diskUsage -> (double) diskUsage / BYTES_IN_GB / nodeSpec.minDiskAvailableGb)
                        .filter(diskUtil -> diskUtil >= 0.8)
                        .ifPresent(diskUtil -> storageMaintainer.removeOldFilesFromNode(containerName));

                scheduleDownLoadIfNeeded(nodeSpec);
                if (isDownloadingImage()) {
                    addDebugMessage("Waiting for image to download " + imageBeingDownloaded.asString());
                    return;
                }
                container = removeContainerIfNeededUpdateContainerState(nodeSpec, container);
                if (! container.isPresent()) {
                    storageMaintainer.handleCoreDumpsForContainer(containerName, nodeSpec, false);
                    startContainer(nodeSpec);
                }

                runLocalResumeScriptIfNeeded();
                
                
                
                
                
                
                
                
                
                
                updateNodeRepoWithCurrentAttributes(nodeSpec);
                logger.info("Call resume against Orchestrator");
                orchestrator.resume(hostname);
                break;
            case inactive:
                removeContainerIfNeededUpdateContainerState(nodeSpec, container);
                updateNodeRepoWithCurrentAttributes(nodeSpec);
                break;
            case provisioned:
                nodeRepository.markAsDirty(hostname);
                break;
            case dirty:
                removeContainerIfNeededUpdateContainerState(nodeSpec, container);
                logger.info("State is " + nodeSpec.nodeState + ", will delete application storage and mark node as ready");
                storageMaintainer.cleanupNodeStorage(containerName, nodeSpec);
                updateNodeRepoWithCurrentAttributes(nodeSpec);
                nodeRepository.markNodeAvailableForNewAllocation(hostname);
                expectNodeNotInNodeRepo = true;
                break;
            default:
                throw new RuntimeException("UNKNOWN STATE " + nodeSpec.nodeState.name());
        }
    }