Clear future subscriptions info on license destroy
What does this MR do and why?
When a license is removed from a SM instance. The associated future subscriptions that are saved in the settings to be displayed in the Subscription History should be cleared.
Currently the license is deleted but the future subscriptions settings remain so upon adding a different license / activating another subscription these settings are displayed as part of the Subscription History even when unrelated.
Screenshots or screen recordings
Screen recording available in the related issue: https://gitlab.com/gitlab-org/gitlab/-/issues/352070
How to set up and validate locally
- Using your gdk navigate to your Admin -> Subscription section
- Activate a Cloud License with a future renewed term
- Trigger a Seat Link Sync so the future subscriptions are retrieved
- Wait few seconds and reload the page
- Note information about the available future terms is displayed
- Remove the current license via the "Remove license" button
- Load or Activate a license that doesn't have a future renewed term
Before:
- Note based on the screen recording in the Summary for the related issue: https://gitlab.com/gitlab-org/gitlab/-/issues/352070 that the future subscriptions were still listed in the Subscription History table.
Now:
- The Subscription History table ONLY contains a row related to the current license that was last added / activated.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #352070
Edited by Vladlena Shumilo