Fix typo bug in releases latest permalink
What does this MR do and why?
Permanent link to latest release feature with the request link of the form
https://host/namespace/project/-/releases/permalink/latest?order_by=unsupport
is expected to ignore the invalid order_by
parameter and sort by using released_at
.
But instead it is using order_created_desc
for ordering when an invalid order_by=
parameter is passed.
This bug is because of a negation typo in code and was captured in !82335 (comment 871921696)
Thanks to @acook.gitlab for catching it
Screenshots or screen recordings
Verified in logs for the query generated.
Before (order_by using created_at
):
After (order_by using released_at
):
How to set up and validate locally
-
Create a release say v1.0.0 in local on the
flightjs/Flight
project. - Then visit http://localhost:3000/flightjs/Flight/-/releases/permalink/latest?order_by=unsupported and it should take to http://localhost:3000/flightjs/Flight/-/releases/v1.0.0. Verify in the logs that the query generated is using order_by using
released_at
instead ofcreated_at
.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #16821 (closed)