GitLab API: merge request pipeline is limited to oldest XY results
Summary
We had a long term branch with ~800 commits. All good, but we had more than 61 pipelines. As one can see from the picture, the last successful pipeline #12010 (closed) is not the one presented in the Pipelines tab.
We noticed this bug at the API level (get pipelines for a specific MR) because a script was checking the last pipeline status and received canceled
(=> pipeline FAIL), although on the MR summary there was a nice green PASS.
We're using Jenkins for CI (not GitLab Runner). The pipelines are triggered via webhooks on push/MR events.
We could reproduce this problem initially on Jenkins, but now on Gitlab Runner too.
Steps to reproduce
Create a large MR with more than a hundred commits and more than a hundred changes. BIG changes.
What is the current bug behavior?
URL: "GITLAB_API/projects/
group%2Fproj/merge_requests/
mriid/pipelines"
=> will return only the oldest XY pipelines
What is the expected correct behavior?
Should return all pipelines, more important the newest first.
Relevant logs and/or screenshots
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 16.04 Current User: git Using RVM: no Ruby Version: 2.4.4p296 Gem Version: 2.7.6 Bundler Version:1.16.2 Rake Version: 12.3.1 Redis Version: 3.2.11 Git Version: 2.18.0 Sidekiq Version:5.1.3 Go Version: unknown
GitLab information Version: 11.2.4 Revision: cd435de Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://git.COMPANY.net HTTP Clone URL: https://git.COMPANY.net/some-group/some-project.git SSH Clone URL: git@git.COMPANY.net:some-group/some-project.git Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 8.1.1 Repository storage paths: default: /srv/git/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...
GitLab Shell version >= 8.1.1 ? ... OK (8.1.1) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 4/1 ... ok 4/2 ... ok 4/3 ... ok 4/4 ... ok 4/5 ... ok 36/6 ... ok 5/7 ... ok 37/10 ... ok 37/11 ... ok 37/12 ... ok 5/13 ... ok 5/14 ... ok 5/15 ... ok 5/16 ... ok 35/17 ... ok 35/18 ... ok 35/19 ... ok 7/20 ... ok 4/21 ... ok 5/22 ... ok 48/23 ... ok 59/24 ... ok 59/25 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml Checking LDAP ...
Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) DN: uid=nobody,ou=people,dc=COMPANY,dc=com uid: nobody DN: ... Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes 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? ... 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: ... 4/1 ... yes 4/2 ... yes 4/3 ... yes 4/4 ... yes 4/5 ... yes 36/6 ... yes 5/7 ... yes 37/10 ... yes 37/11 ... yes 37/12 ... yes 5/13 ... yes 5/14 ... yes 5/15 ... yes 5/16 ... yes 35/17 ... yes 35/18 ... yes 35/19 ... yes 7/20 ... yes 4/21 ... yes 5/22 ... yes 48/23 ... yes 59/24 ... yes 59/25 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.4) Git version >= 2.9.5 ? ... yes (2.18.0) Git user has default SSH configuration? ... yes Active users: ... 54
Checking GitLab ... Finished