Skip to content

Feature/control import options

Created by: artem-sidorenko

Import options are displayed by creation of a new project. Currently all possible options are there, which leads to following possible issues:

Issue 1 - End user confusion: Configuration recommendation outside of own responsibility

  1. Not configured sources(oauth) - which are not usable for the end user of Gitlab installation
  2. End user gets probably a hint, which links to the oath configuration steps, which can be done only by Gitlab admin
  3. Admin phone is ringing / email inbox gets a new mail / support ticket system gets a new ticket with a support request like "why do we have Github as a source here, but I can't use that?"

Issue 2: Restricted environments - No internet access:

  1. In some environments with strong security requirements its quite common NOT to have Internet access (or not a permanent direct internet connection)
  2. In this cases such import functionality won't work at all and can't be realized (because of restrictions)
  3. This leads to the Issue 1

Issue 3: Missing OAuth credentials

  1. Organisation using this particular Gitlab installation doesn't have Github/Bitbucket/* accounts and has no need to have them
  2. For the organisation it doesn't make really sense to create the according accounts only to allow this import
  3. This leads to the Issue 1

I've already created the #9553 and here the first code implementation. This MR is marked as [WIP] and I would like to get your feedback in the current state and clarify some questions. (Please keep in mind, this is my first MR to Gitlab, I want to get feedback and have some ugly code for sure:) )

The idea to solve this issues is to provide a possibility to configure the import sources (and to keep all enabled by default)

Admin interface (new buttons + links to the help pages for admins) admin-interface

New project interface (same like before, but only the enabled/configured sources are displayed and no admin related help hints for end users) new-project

Questions:

  • I couldn't disable the "Any repo by URL" code, currently its hidden by the template.
    • Is it required to do this in this MR? (probably it makes sense to refactor it in some other MR and to move it to the same structure like other importers)
    • If its required, can you please show/explain me the modules/logic/flow? (I was lost at some point in the flow between the modules)

Following points are implemented/todo:

  • Settings in the admin interface
  • DB migrations
  • Handling of import source configuration in "new project"
  • Spinach tests fixed/added

Something else?

Merge request reports

Loading