[slack] "Compare Change" link broken in gitlab 16.0 (self-hosted)

Hi there,

Just upgraded our self-hosted gitlab instance from 15.11 to 16.0, and now the link “compare changes” in the slack widget is broken.
it brings to https://xxx.xxx.tld/group/project/compare/77bff755be7f4ee788f71b256b88146200735884...cb16035e307e978ba9577dc1f0d184f763f5c460
instead of https://xxx.xxx.tld/group/project/-/compare/77bff755be7f4ee788f71b256b88146200735884...cb16035e307e978ba9577dc1f0d184f763f5c460

is it a known issue ?

For now I find a “workaround” by patching the file app/models/integrations/chat_message/push_message.rb#L90 which is located in /opt/gitlab/embedded/service/gitlab-rails/app/models/integrations/chat_message/push_message.rb

Bug opened also [slack integration] link "compare changes" broken on self-hosted install since 16.0 (#413776) · Issues · GitLab.org / GitLab · GitLab

1 Like

not sure the fix I did is correct.

I think the root cause is actually there is no redirection of https://xxx.xxx.tld/group/project/compare/... to https://xxx.xxx.tld/group/project/-/compare/... as it exists for other urls like commit or tag

Looks like you ran into a breaking change that what documented in the release notes for 16.0. See legacy-routes-removed.

Thanks for pointing the source of the issue.
Meanwhile it was fixed.