Skip to content

Revert 219658 - Update routes for lost-and-found group and projects

What does this MR do?

Reverts !33653 (merged) since it is causing a PG::UniqueViolation error when run on production:

PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "index_routes_on_path"
     DETAIL:  Key (path)=(lost-and-found) already exists.

Reverting this should be safe and will not require any updates on production.

Full stack trace of the issue:

     == 20200602143020 UpdateRoutesForLostAndFoundGroupAndOrphanedProjects: migrating
     rake aborted!
     StandardError: An error has occurred, this and all later migrations canceled:
     PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "index_routes_on_path"
     DETAIL:  Key (path)=(lost-and-found) already exists.
     /opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20200602143020_update_routes_for_lost_and_found_group_and_orphaned_projects.rb:78:in `ensure_route!'
     /opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20200602143020_update_routes_for_lost_and_found_group_and_orphaned_projects.rb:153:in `up'
     /opt/gitlab/embedded/bin/bundle:23:in `load'
     /opt/gitlab/embedded/bin/bundle:23:in `<main>'
     Caused by:
     ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "index_routes_on_path"
     DETAIL:  Key (path)=(lost-and-found) already exists.
     /opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20200602143020_update_routes_for_lost_and_found_group_and_orphaned_projects.rb:78:in `ensure_route!'
     /opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20200602143020_update_routes_for_lost_and_found_group_and_orphaned_projects.rb:153:in `up'
     /opt/gitlab/embedded/bin/bundle:23:in `load'
     /opt/gitlab/embedded/bin/bundle:23:in `<main>'
     Caused by:
     PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "index_routes_on_path"
     DETAIL:  Key (path)=(lost-and-found) already exists.
     /opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20200602143020_update_routes_for_lost_and_found_group_and_orphaned_projects.rb:78:in `ensure_route!'
     /opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20200602143020_update_routes_for_lost_and_found_group_and_orphaned_projects.rb:153:in `up'
     /opt/gitlab/embedded/bin/bundle:23:in `load'
     /opt/gitlab/embedded/bin/bundle:23:in `<main>'
     Tasks: TOP => db:migrate
     (See full trace by running task with --trace)?;

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] 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
Edited by 🤖 GitLab Bot 🤖

Merge request reports