GitLab Direct Transfer - update invalid source GitLab URL error message

What does this MR do and why?

This MR sets a better, more informative error message when a user entered an invalid source GitLab Instance while using Gitlab Direct Transfer.

The main reason for this change is a user would enter a group path (e.g. http://gitlab.example/foo/bar instead of http://gitlab.example) and would receive an error message Unsupported GitLab version. Source instance must run GitLab version 14 or later which is an incorrect error message, since entered instance might be supported. So the error message now should be more descriptive and say Invalid source URL. Enter only the base URL of the source GitLab instance.

Note: it was considered to always use base url of the entered url (e.g. to use http://gitlab.example when user entered http://gitlab.example/foo/bar) but that would break relative URL support done in 8b871c33 so we return an error to the user instead.

Mentions #389510 (closed)

Screenshots or screen recordings

image

How to set up and validate locally

  1. Open http://gdk.test:3000/groups/new#import-group-pane
  2. Enter source gitlab instance URL with a path to a group and click 'Connect Instance'
  3. Observe returned error message saying Invalid source URL. Enter only the base URL of the source GitLab instance.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by George Koltsov

Merge request reports

Loading