[Bug 276279] www/gitlab-ce 16.7.0 and 16.7.2 - database migration script fails

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 12 Jan 2024 19:43:44 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276279

            Bug ID: 276279
           Summary: www/gitlab-ce 16.7.0 and 16.7.2 - database migration
                    script fails
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: mfechner@FreeBSD.org
          Reporter: laurent@daverio.net
             Flags: maintainer-feedback?(mfechner@FreeBSD.org)
          Assignee: mfechner@FreeBSD.org

After updating Gitlab CE 16.6 to 16.7.0 (the process took several days, as many
gem files were initially missing from distfiles), I proceeded to run the
upgrade scripts, as per the usual procedure.

The DB migration script failed with the following error message:

```
PG::DuplicateColumn: ERROR:  column "name" of relation "catalog_resources"
already exists
/usr/local/www/gitlab-ce/db/migrate/20231019180421_add_name_description_to_catalog_resources.rb:11:in
`up'
```

I let things sleep. Today, Gitlab CE 16.7.2 came up in the ports tree, so I
attempted the upgrade again. The same message appeared.

So, I commented out the indicated line, and re-ran the script :

```
PG::DuplicateColumn: ERROR:  column "description" of relation
"catalog_resources" already exists
/usr/local/www/gitlab-ce/db/migrate/20231019180421_add_name_description_to_catalog_resources.rb:12:in
`up'
```

I commented out that line again, and gave it a third try. This time, the error
message is different:

```
PG::UndefinedFile: ERROR:  could not access file "$libdir/pg_trgm": No such
file or directory
/usr/local/www/gitlab-ce/lib/gitlab/database/migration_helpers.rb:122:in `block
in add_concurrent_index'
```

Gitlab seems to be running without the migration, at least the projects list.
At the moment I'm not sure what functions, if any, are impacted.

-- 
You are receiving this mail because:
You are the assignee for the bug.