Pipeline badge switches to "unkonwn" when no pipeline is triggered

Summary

When pushing changes that don't trigger a pipeline because of only policies, the "pipeline" badge for the branch switches to "unknown" instead of displaying the last piepline's result. Note that I am specifically refering to the pipeline badge linked to a branch, since they are to ones that get updated.

Steps to reproduce

  1. Create a project with a README containing the "pipeline" badge, and a CI pipeline with an only policy
  2. Push a commit that triggers the pipeline
  3. Push a second commit that doesn't trigger the pipeline

What is the current bug behavior?

The "pipeline" badge for the branch becomes "unkown" when no new pipeline is triggered by a push

What is the expected correct behavior?

The "pipeline" badge still displays the last pipeline's result, even when a push occurs that doesn't trigger a new pipeline

Results of GitLab environment info

Expand for output related to GitLab environment info
System information
System:         Ubuntu 18.04
Current User:   git
Using RVM:      no
Ruby Version:   2.6.3p62
Gem Version:    2.7.9
Bundler Version:1.17.3
Rake Version:   12.3.2
Redis Version:  3.2.12
Git Version:    2.22.0
Sidekiq Version:5.2.7
Go Version:     unknown

GitLab information Version: 12.3.1 Revision: 3440d0f6100 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.9 URL: https://[...] HTTP Clone URL: https://[...] SSH Clone URL: git@[...] Using LDAP: no Using Omniauth: yes Omniauth Providers: github, gitlab, bitbucket, twitter, google_oauth2

GitLab Shell Version: 10.0.0 Repository storage paths:

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

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 >= 10.0.0 ? ... OK (10.0.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: 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 ... 1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Checking Reply by email ...

IMAP server credentials are correct? ... yes Init.d configured correctly? ... skipped MailRoom running? ... skipped

Checking Reply by email ... Finished

Checking Incoming Email ... Finished

Checking LDAP ...

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

Checking LDAP ... Finished

Checking GitLab App ...

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/9 ... yes 4/13 ... yes 4/14 ... yes 4/15 ... yes 4/16 ... yes 4/19 ... yes 8/21 ... yes 11/22 ... yes 11/23 ... yes 11/24 ... yes 11/25 ... yes 4/26 ... yes 11/27 ... yes 11/28 ... yes 4/31 ... yes 5/32 ... yes 11/33 ... yes 4/34 ... yes 13/40 ... yes 13/41 ... yes 14/42 ... yes 14/43 ... yes 14/44 ... yes 14/45 ... yes 15/47 ... yes 16/48 ... yes 4/49 ... yes 4/50 ... yes 4/51 ... yes 4/52 ... yes 16/53 ... yes 4/54 ... yes 11/55 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.3) Git version >= 2.22.0 ? ... yes (2.22.0) Git user has default SSH configuration? ... yes Active users: ... 7 Is authorized keys file accessible? ... yes

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Assignee Loading
Time tracking Loading