Upgrade Gitlab version 16.11.3 -> 17.0.1

Problem to solve

Hello everyone. I am trying to upgrade GitLab from version 16.11.3 to version 17.0.1. I am using the Docker image gitlab17.0.1-ce.0, but when the upgrade process starts migrating the database, I get this error. ERROR: cannot drop constraint ci_pipelines_pkey on table ci_pipelines because other objects depend on it.DETAIL: constraint fk_c262d728d4 on table p_ci_builds depends on index ci_pipelines_pkey

Steps to reproduce

sudo docker run --detach --privileged --hostname *** --publish 443:443 --publish 80:80 --publish 8081:8081 --publish 8083:22 --name gitlab --volume /srv/gitlab/config:/etc/gitlab --volume /srv/gitlab/logs:/var/log/gitlab --volume /mnt/volume/gitlab/data:/var/opt/gitlab --volume /mnt/volume/gitlab_backups:/mnt/backups gitlab/gitlab-ce:17.0.1-ce.0


Actually 16.11.3

This issue seems relevant: Database migration error when upgrade from 16.11.2 to 17.0.0 (#462591) · Issues · GitLab.org / GitLab · GitLab

It looks like a potential fix has been merged which should be released with the 17.0.2 version. A community member also shared a workaround here.