Code review comment: This change makes sense. We don't have any tests that cover this for the issue that's resolved in this PR, though (reverting the change in `Executing` won't cause any failures). We might want to add another test like that one: ```java     @Test     public void             testNotifyNewResourcesAvailableWithCanScaleUpWithoutForceWhileTransitioningIntoExecutingState()                     throws Exception {         try (MockExecutingContext ctx = new MockExecutingContext()) {             final ExecutingStateBuilder executingStateBuilder =                     new ExecutingStateBuilder()                             .setScalingIntervalMin(Duration.ofSeconds(20L))                             .setScalingIntervalMax(Duration.ofSeconds(30L))                             .setLastRescale(Instant.now().minus(Duration.ofSeconds(25L)));              // slots become available while transitioning into Executing state             ctx.setCanScaleUp(true);              final Executing exec = executingStateBuilder.build(ctx);              ctx.setExpectRestarting(                     restartingArguments ->                             assertThat(                                     "Rescaling should be triggered immediately after transitioning into Executing state.",                                     restartingArguments.getBackoffTime(),                                     is(Duration.ZERO)));             exec.onNewResourcesAvailable();         }     } ```

Code under review:
private Executing build(MockExecutingContext ctx) {
            executionGraph.transitionToRunning();

            try {
                return new Executing(
                        executionGraph,
                        getExecutionGraphHandler(executionGraph, ctx.getMainThreadExecutor()),
                        operatorCoordinatorHandler,
                        log,
                        ctx,
                        ClassLoader.getSystemClassLoader(),
                        new ArrayList<>(),
                        scalingIntervalMin,
                        scalingIntervalMax,
                        lastRescale);
            } finally {
                Preconditions.checkState(
                        !ctx.hadStateTransition,
                        "State construction is an on-going state transition, during which no further transitions are allowed.");
            }
        }

Line commented on: try {

Revised code:
private Executing build(MockExecutingContext ctx) {
            executionGraph.transitionToRunning();

            try {
                return new Executing(
                        executionGraph,
                        getExecutionGraphHandler(executionGraph, ctx.getMainThreadExecutor()),
                        operatorCoordinatorHandler,
                        log,
                        ctx,
                        ClassLoader.getSystemClassLoader(),
                        new ArrayList<>(),
                        scalingIntervalMin,
                        scalingIntervalMax,
                        lastRescale);
            } finally {
                Preconditions.checkState(
                        !ctx.hadStateTransition,
                        "State construction is an on-going state transition, during which no further transitions are allowed.");
            }
        }