Going to Settings -> Chat causes 500 server error

Visiting link https://gitlab.com/profile/chat_names causes 500 server error

500 Whoops, something went wrong on our end.

I visited it in the last few minutes a few times, so you probably can get logs of this time.

Steps to Reproduce in GDK with mattermost

  1. Add mattermost to your procfile or run it some other way locally
    # Mattermost
    #
    mattermost: exec docker run --sig-proxy=true -v <gdk path>/mattermost/data/:/mm/mattermost-data/  -v <gdk path>/mattermost/mysql/:/var/lib/mysql --publish 8065:8065 mattermost/mattermost-preview
    dtunnel_mattermost: exec ssh -N -o ControlPath=none -o ControlMaster=no -R <qa tunnel port>:localhost:8065 qa-tunnel.gitlab.info
  2. Setup the mattermost slash command integration with a project in gdk, instructions are at is at /-/services/mattermost_slash_commands/edit
  3. In mattermost, run /your_command help and click the link to add the chat name
  4. Delete the project
  5. Visit /profile/chat_names

Expected Behavior

The page loads as expected

Actual Behavior

The page throws a 500.

Explaination

While we have a reference between project and chat_name, and we ensure the project is non-null. We don't do a cascade delete on chat names when we remove the project (it's missing a foreign key). So when it tries to look up the project by ID there isn't one.

Edited Feb 07, 2024 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading