The policy list intermittently shows policies from recently removed security policy project
Summary
When removing a security policy project (SPP), some policies are not removed from the policy list until a page refresh because the removal of the SPP happens as a background job, which is why the success banner says The SPP will be removed shortly.
If you are like, who doesn't read the banners, but only looks at the colors, this can be confusing. Plus policies are left in the list when they should be removed and they won't be removed until a page refresh
Steps to reproduce
1.Upload a GitLab Ultimate license
- Navigate to a project => Secure => Policies
- Link a security policy project
- Unlink the security policy project
Example Project
What is the current bug behavior?
Policies from the SPP appear in the list after deletion
What is the expected correct behavior?
Policies from the SPP do not appear in the list after deletion
Relevant logs and/or screenshots
intermittently_shows_policies_small
Possible fixes
The requests happen in ee/app/assets/javascripts/security_orchestration/components/policies/app.vue, so I would start there and inspect the graphql queries