Pipeline notification emails sent to the wrong user
Design
Summary
When commits are created and pushed by different users (for example, when synchronising from another VCS), Gitlab is inconsistent when showing the user that triggered a pipeline, and which user is notified
Steps to reproduce
- Create a repo, and check it out under an existing Gitlab user (user A).
- Create or pull a commit by a second existing Gitlab user (user B)
- Push the commit to Gitlab, authenticating as user A
What is the current bug behavior?
A pipeline notification email is sent to user A, showing the author as user B. The pipelines section inside the repo shows the pipeline as being triggered by user B. The builds section inside the admin area shows the build as being from a pipeline by user A.
What is the expected correct behavior?
Consistently emailing user A or B (possible configurable), and showing the same user in the pipelines section of the repo and the build section of the admin area.
Relevant logs and/or screenshots
email sent to user A, which shows the author of the commit as user B The pipelines page of the project also shows user B However the admin section shows user A
Output of checks
Results of GitLab environment info
System information
System: Debian 8.7
Current User: git
Using RVM: no
Ruby Version: 2.3.3p222
Gem Version: 2.6.6
Bundler Version:1.13.7
Rake Version: 10.5.0
Sidekiq Version:4.2.7
GitLab information
Version: 8.16.1
Revision: c6c28e6
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: https://gitlab.itvet.co.uk
HTTP Clone URL: https://gitlab.itvet.co.uk/some-group/some-project.git
SSH Clone URL: git@gitlab.itvet.co.uk:some-group/some-project.git
Using LDAP: yes
Using Omniauth: no
GitLab Shell
Version: 4.1.1
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Checking GitLab Shell ...
GitLab Shell version >= 4.1.1 ? ... OK (4.1.1)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
3/1 ... ok
3/2 ... repository is empty
2/3 ... ok
2/4 ... ok
2/5 ... ok
3/6 ... repository is empty
2/7 ... ok
2/8 ... ok
2/9 ... ok
2/10 ... ok
2/11 ... ok
2/12 ... ok
2/13 ... ok
3/14 ... ok
2/15 ... ok
2/16 ... ok
2/17 ... ok
3/18 ... ok
3/19 ... ok
3/20 ... ok
2/21 ... ok
2/22 ... ok
2/23 ... ok
13/24 ... ok
3/27 ... ok
13/28 ... ok
2/29 ... ok
13/30 ... ok
2/31 ... ok
2/32 ... ok
3/33 ... ok
3/34 ... ok
3/35 ... ok
3/36 ... ok
3/37 ... ok
3/38 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
Server: ldapmain
LDAP authentication... Success
LDAP users with access to your GitLab server (only showing the first 100 results)
<Removed long list of Active Directory users>
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
projects have namespace: ...
3/1 ... yes
3/2 ... yes
2/3 ... yes
2/4 ... yes
2/5 ... yes
3/6 ... yes
2/7 ... yes
2/8 ... yes
2/9 ... yes
2/10 ... yes
2/11 ... yes
2/12 ... yes
2/13 ... yes
3/14 ... yes
2/15 ... yes
2/16 ... yes
2/17 ... yes
3/18 ... yes
3/19 ... yes
3/20 ... yes
2/21 ... yes
2/22 ... yes
2/23 ... yes
13/24 ... yes
3/27 ... yes
13/28 ... yes
2/29 ... yes
13/30 ... yes
2/31 ... yes
2/32 ... yes
3/33 ... yes
3/34 ... yes
3/35 ... yes
3/36 ... yes
3/37 ... yes
3/38 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.3)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 2.7.3 ? ... yes (2.10.2)
Active users: 12
Checking GitLab ... Finished
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)