Fetch environment before checking its `state`
What does this MR do?
This fixes an issue introduced by !26678 (merged). This lead to an increase of nodes since stale Review Apps weren't cleaned up.
Does this MR meet the acceptance criteria?
Conformity
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Separation of EE specific content
Closes #209771 (closed).
Edited by Rémy Coutable