Skip to content

Add 13.8.3 as an intermediate stop for upgrade paths

Jason Young requested to merge docs-jayo-add-thirteen-eight-to-upgrade-path into master

What does this MR do?

This adds an intermediate upgrade step for GitLab 13.8.3 due to a background migration introduced in 13.8 that needs to complete before the migrations included 13.9 are executed.

In GitLab 13.8 - we added a migration that will clean up Duplicate Services in the services table.

That migration is scheduled to run in the background. Unfortunately, that doesn't happen fast enough when going straight through to 13.9+ - there's an index creation migration on that table - added in 13.9 that depends on the duplicates being removed.

When duplicate services are still present, the upgrade to 13.9 or later versions from GitLab versions prior to 13.8 will result in the following error:

PG::UniqueViolation: ERROR:  could not create unique index "index_services_on_project_id_and_type_unique"
DETAIL:  Key (project_id, type)=(NNN, ServiceName) is duplicated.
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migration_helpers.rb:153:in `block in add_concurrent_index'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migration_helpers.rb:334:in `disable_statement_timeout'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migration_helpers.rb:152:in `add_concurrent_index'
/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20210126091713_add_unique_index_services_project_id_and_type.rb:13:in `up'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:61:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'

Author's checklist

If you are only adding documentation, do not add any of the following labels:

  • ~"feature"
  • ~"frontend"
  • ~"backend"
  • ~"bug"
  • ~"database"

These labels cause the MR to be added to code verification QA issues.

Review checklist

Documentation-related MRs should be reviewed by a Technical Writer for a non-blocking review, based on Documentation Guidelines and the Style Guide.

  • If the content requires it, ensure the information is reviewed by a subject matter expert.
  • Technical writer review items:
    • Ensure docs metadata is present and up-to-date.
    • Ensure the appropriate labels are added to this MR.
    • If relevant to this MR, ensure content topic type principles are in use, including:
      • The headings should be something you'd do a Google search for. Instead of Default behavior, say something like Default behavior when you close an issue.
      • The headings (other than the page title) should be active. Instead of Configuring GDK, say something like Configure GDK.
      • Any task steps should be written as a numbered list.
      • If the content still needs to be edited for topic types, you can create a follow-up issue with the docs-technical-debt label.
  • Review by assigned maintainer, who can always request/require the above reviews. Maintainer's review can occur before or after a technical writer review.
  • Ensure a release milestone is set.

Merge request reports