[go: up one dir, main page]

Skip to content

GitLab Mattermost incorrectly displays bot previews when link unfurling is disabled

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

When bot messages are posted, they seem to exhibit the inverse behaviour where when message links are disabled, the bot's messages are displayed. When the link previews are enabled the bots don't display previews.

Steps to reproduce

  1. copy the permalink of "Message posted by bot" in GitLab Mattermost
  2. Paste the copied permalink into Gitlab Mattermost and post it. 3.Immediately after posting, the "message posted by the bot" from which the link was copied will no longer be displayed.

Example Project

What is the current bug behavior?

When bot messages are posted, they seem to exhibit the inverse behaviour where when message links are disabled, the bot's messages are displayed. When the link previews are enabled the bots don't display previews.

Attached are two screenshots of the issue

Screen_Shot_2022-06-15_at_14.56.20

Screen_Shot_2022-06-15_at_14.46.36

What is the expected correct behavior?

The bot link should correctly respect the settings for link unfurling/previews.

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Environment Information Docker in AWS EC2 instance

  • Docker 20.10.12
  • Gitlab 14.9
  • Gitlab Mattermost 6.4.2
  • GitLab and GitLab Mattermost are running on separate instances.
  • Gitlab Mattermost is authenticated on a separate instance of Gitlab.
Expand for output related to GitLab environment info

System information
System:
Proxy: no
Current User: git
Using RVM: no
Ruby Version: 2.7.5p203
Gem Version: 3.1.4
Bundler Version:2.2.33
Rake Version: 13.0.6
Redis Version: 6.2.6
Sidekiq Version:6.4.0
Go Version: unknown

GitLab information
Version: 14.9.2-ee
Revision: 3034418fb31
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: PostgreSQL
DB Version: 12.7
URL: https://gitlab.
HTTP Clone URL: https://gitlab./some-group/some-project.git
SSH Clone URL: git@gitlab.:some-group/some-project.git
Elasticsearch: no
Geo: no
Using LDAP: no
Using Omniauth: yes
Omniauth Providers:

GitLab Shell
Version: 13.24.0
Repository storage paths:

default: /var/opt/gitlab/git-data/repositories
GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell

Results of GitLab application Check

Expand for output related to the GitLab application check
Checking GitLab subtasks …

Checking GitLab Shell …

GitLab Shell: … GitLab Shell version >= 13.24.0 ? … OK (13.24.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful

Checking GitLab Shell … Finished

Checking Gitaly …

Gitaly: … default … OK

Checking Gitaly … Finished

Checking Sidekiq …

Sidekiq: … Running? … yes Number of Sidekiq processes (cluster/worker) … 1/1

Checking Sidekiq … Finished

Checking Incoming Email …

Incoming Email: … Reply by email is disabled in config/gitlab.yml

Checking Incoming Email … Finished

Checking LDAP …

LDAP: … LDAP is disabled in config/gitlab.yml

Checking LDAP … Finished

Checking GitLab App …

Database config exists? … yes All migrations up? … yes Database contains orphaned GroupMembers? … no GitLab config exists? … yes GitLab config up to date? … yes Log directory writable? … yes Tmp directory writable? … yes Uploads directory exists? … yes Uploads directory has correct permissions? … yes Uploads directory tmp has correct permissions? … skipped (no tmp uploads folder yet) Systemd unit files or init script exist? … skipped (omnibus-gitlab has neither init script nor systemd units) Systemd unit files or init script up-to-date? … skipped (omnibus-gitlab has neither init script nor systemd units) Projects have namespace: … 2/1 … yes Redis version >= 5.0.0? … yes Ruby version >= 2.7.2 ? … yes (2.7.5) Git user has default SSH configuration? … yes Active users: … 1 Is authorized keys file accessible? … yes GitLab configured to store new projects in hashed storage? … yes All projects are in hashed storage? … yes Elasticsearch version 7.x (6.4 - 6.x deprecated to be removed in 13.8)? … skipped (elasticsearch is disabled)

Checking GitLab App … Finished

Checking GitLab subtasks … Finished

Possible fixes

We have the following workaround:

  1. disable [Post] => [Message Link Preview] in the system settings of Gitlab Mattermost
  2. copy the permalink of "messages posted by the bot" in Gitlab Mattermost
  3. paste the copied permalink to Gitlab Mattermost and post it, but "message posted by bot" doesn't disappear
Edited by 🤖 GitLab Bot 🤖