Ensure pipeline stages are listed in the correct order #2384
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2363
Description
Ensures the stages in a pipeline are returned in the correct order.
Previously, they were returned in the order the database returned them and didn't take into account
NextStageId
. This was generally based on creation time, so our testing never saw this issue. For some reason, in some cases, the database is returning them in a different order.The fix was to either fix the API to ensure the order, or fix the frontend to sort the list itself (or both). It felt more correct for the API to return a properly ordered list.
Checklist
I have read the contribution guidelines
Suitable unit/system level tests have been added and they pass <!-- If not adding test coverage, please clarify why ## Labels
Backport needed? -> add the
backport
label