Skip to content

Fix typo bug in releases latest permalink

Bala Kumar requested to merge fix-typo-releases-latest-permalink into master

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): Screenshot_2022-03-15_at_6.15.09_PM

After (order_by using released_at): Screenshot_2022-03-15_at_6.13.39_PM

How to set up and validate locally

  1. Create a release say v1.0.0 in local on the flightjs/Flight project.
  2. 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 of created_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.

Related to #16821 (closed)

Edited by Bala Kumar

Merge request reports

Loading