Fix simultaneous requests for vulnerabilities on pipeline security tab
What does this MR do?
On the pipeline details page, the security tab shows a list of vulnerabilities with selectable filters:
When clicking rapidly on the dropdown options, multiple network requests will be initiated simultaneously:
Because the last request that completes will set the vulnerability list rather than the last request that was initiated, there's an issue where the vulnerability list may not match with what's selected in the filter:
This MR fixes that behavior by cancelling any in-flight network requests for vulnerabilities so that only one can be active at a time:
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines - [-] Style guides
- [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers - [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Edited by Daniel Tian