Skip to content

Resolve "Permanent link to latest version of a release"

Bala Kumar requested to merge permanent-link-to-latest-release into master

What does this MR do and why?

Provides a permanent link to the latest release. And it can be used as in the following examples.

Examples:

  1. If v1.0.0 is the latest release for gitlab-org/gitlab then

https://gitlab.com/gitlab-org/gitlab/-/releases/permalink/latest will redirect to https://gitlab.com/gitlab-org/gitlab/-/releases/v1.0.0

  1. If the latest release say v1.0.0, has a permanent asset link like https://host/namespace/project/-/releases/v1.0.0/downloads/:filepath then

https://gitlab.com/gitlab-org/gitlab/-/releases/permalink/latest/downloads/:filepath will redirect to https://gitlab.com/gitlab-org/gitlab/-/releases/v1.0.0/downloads/:filepath

We currently support latest release fetch using order_by: created_at and in future we can extend to semver using url parameters which is tracked in issue #352945

Documentation for this feature is covered in separate MR !81913 (merged)

Screenshots or screen recordings

releases/permalink/latest

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 and it should take to http://localhost:3000/flightjs/Flight/-/releases/v1.0.0

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