Skip to content

Geo Node Form Regression - Relative URLs broken

Zack Cuddy requested to merge 337177-geo-relative-urls into master

What does this MR do?

Closes #337177 (closed)

A bug was identified with more complex paths used in GitLab that the Nodes forms were redirecting to absolute paths which ended up with the user hitting a 404.

Ex. Domain: https://gitlab.example.com/gitlab/ removed the gitlab parameter when redirecting resulting in the new path being https://gitlab.example.com/admin/geo/nodes rather than https://gitlab.example.com/gitlab/admin/geo/nodes

This approach to fixing this was to revert to using the Rails Path variable for the geo_nodes page. This was how the redirects were handled before the forms was converted to Vue.

Screenshots or Screencasts (strongly suggested)

Bug Fix
Bug Fix

How to setup and validate locally (strongly suggested)

  1. Set up Geo on your GDK
  2. Fetch/Checkout this branch on your Primary Node (gdk-primary)
  3. Update your Primary Node's (gdk-primary) gdk.yml by adding relative_url_root: "/gitlab"
  4. Run gdk reconfigure

For Geo Nodes Edit Form

  1. Navigate to http://127:0:0:1/gitlab/admin/geo/nodes
  2. Click Edit
  3. Click Save changes or Cancel
  4. Ensure you are redirected back to http://127:0:0:1/gitlab/admin/geo/nodes and not 404

For Geo Nodes Settings Form

  1. Navigate to http://127:0:0:1/gitlab/admin/geo/settings
  2. Click Cancel
  3. Ensure you are redirected back to http://127:0:0:1/gitlab/admin/geo/nodes and not 404

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

Related to #337177 (closed)

Edited by Zack Cuddy

Merge request reports