Misleading message when pipeline is complete

Summary

After a pipeline finishes running, the Security Reports MR Widget show as there is no new vulnerabilities. However, on page refresh, this message is gone and the correct one appears.

Steps to reproduce

This is a bit random, so I'm not exactly sure about the steps but what worked for me was:

  1. Create an MR that introduces a new vulnerability
  2. Wait for the pipeline to complete
  3. After the completion, you should see the security reports MR widget with no new vulnerabilities detected message
  4. If you don't see it, submit another commit and it should trigger a new pipeline
  5. After the completion, now it should appear (hopefully)
  6. Refresh the page and you should see a different message

Example Project

https://gitlab.com/gitlab-examples/security/security-reports/

What is the current bug behavior?

When the pipeline is finished, a wrong message is being displayed

What is the expected correct behavior?

The correct message to be displayed

Relevant logs and/or screenshots

no-new-vulns-bug

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by 🤖 GitLab Bot 🤖