Make pipeline retry take stages order into account
What does this MR do?
This merge request fixes retrying canceled pipeline.
Builds that had not been enqueued should not be started when someone retries the pipeline.
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Added tests for this feature/bug
What are the relevant issue numbers?
Closes #27431 (closed)
Closes #23710 (closed)
Closes #26551 (closed)