Skip to content

Fixed extra slashes in API request paths generated for geo

Carlos Yu requested to merge carlosy1/gitlab-shell:I-365101 into main

What does this MR do and why?

Fixed the bug described in gitlab#365101 (closed) (geo push on secondary fails due to extra slash inside API path) by modifying gitlab-shell (the second suggested option in the issue report). The gitlab-url in configmap can now be set with or without the trailing slash.

How to set up and validate locally

The bug can be replicated by first setting up a gdk with geo following this guide; check gitlab-shell/config.yml under the geo directory and add a trailing slash to gitlab-url field; then, create a dummy project inside gdk, clone it, and try to do a push (should have a message showing it's going through geo), which would fail with the message ERROR: You cannot perform write operations on a read-only instance. Logging with gdk tail sshd should show similar messages mentioned in the issue report. With the fix, whether gitlab-url has a trailing slash would not affect the generated request path and the push would go through successfully. The push should then be visible in the primary.

Merge request reports