In some contexts is unclear why an autoscaling policy decides to request
more resources, i.e. if there's an unassigned shard that remains unassigned
even after adding more resources. It would be help to have more information
around the decisions taken by the deciders so it is easier to understand and
track them.
x-pack/plugin/autoscaling/src/test/java/org/elasticsearch/xpack/autoscaling/storage/ReactiveStorageDeciderDecisionTests.java
ShardRouting toMove = randomFrom(started);
                    Set<RoutingNode> candidates = StreamSupport.stream(allocation.routingNodes().spliterator(), false)
                        .filter(n -> allocation.deciders().canAllocate(toMove, n, allocation) == Decision.YES)
                        .collect(Collectors.toSet());
                    if (candidates.isEmpty() == false) {
                        allocation.routingNodes().relocateShard(toMove, randomFrom(candidates).nodeId(), 0L, allocation.changes());
                    }
                }
            }
        });
    }
    private TestAutoscalingDeciderContext createContext(DiscoveryNodeRole role) {
        return createContext(state, Set.of(role));
    }
    private static TestAutoscalingDeciderContext createContext(ClusterState state, Set<DiscoveryNodeRole> roles) {
        return new TestAutoscalingDeciderContext(state, roles, randomCurrentCapacity());
    }
    static AutoscalingCapacity randomCurrentCapacity() {
        if (randomInt(4) > 0) {
            
            boolean includeMemory = randomBoolean();
            return AutoscalingCapacity.builder()
                .total(randomByteSizeValue(), includeMemory ? randomByteSizeValue() : null)
                .node(randomByteSizeValue(), includeMemory ? randomByteSizeValue() : null)
                .build();
        } else {
            return null;
        }
    }
    private static class TestAutoscalingDeciderContext implements AutoscalingDeciderContext {