Skip to content

Support path redirect for component projects

Fabio Pitino requested to merge support-component-project-redirect into master

What does this MR do and why?

Related to Support project redirection when moving compone... (#434509 - closed)

Support path redirect for component projects.

If a component project is transferred under a different path an a redirect is set for it we are still able to find the content without breaking existing usage of components.

This particularly resolves the problem of moving component projects from gitlab.com/gitlab-components to gitlab.com/components without breaking existing paths.

How to set up and validate locally

  • Create a component project with a component in it.
  • In a different project, include the component previously created.
  • Transfer the component project under a different group.
  • Run a new pipeline for the project consuming the component. At this point the pipeline should fail as the component is not found.
  • Enable the feature flag: Feature.enable(:ci_redirect_component_project)
  • Run a new pipeline for the project consuming the component. Ensure that the old path now works.

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 Fabio Pitino

Merge request reports

Loading