Fix associated release link in tags page
What does this MR do and why?
This merge request is a second attempt at fixing the associated release link in tags page (see #350664 (closed)) as the fix from last week, !86687 (merged), had resulted in an incident earlier today. You can read further details about this in #350664 (comment 948593463) and the linked issues/MRs.
Upon further testing and investigation, it seems that the tag
param in /projects/:project_id/releases/:tag
is being URI-encoded (check here) but we were passing it unescaped to the route method project_release_path
, leading to an unmatched route error. As a workaround, this merge request escapes the release tag name to ensure it will match the route.
How to set up and validate locally
- Start GDK locally, if it isn't up already:
gdk start
. - Ensure that you have a project a couple of tags with a release associated to them, one with at least with a backslash in the tag name.
- Visit the tags page:
http://127.0.0.1:3000/root/:project_name/tags
. - Enable feature flag via Rails console:
Feature.enable(:fix_release_path_in_tag_index_page)
- Click on the links for both releases (for tag with and without backslash).
- Validate that it takes you to the correct links:
http://127.0.0.1:3000/root/:project_name/-/releases/:tag_name
Feature Flags
Feature flag fix_release_path_in_tag_index_page
is used to roll out the fix, to ensure we don't run into another incident.
The rollout issue can be found here: #362915 (closed).
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.