Skip to content

Remove old cloud licenses upon sync or activation

Tyler Amos requested to merge 333870-remove-old-cloud-licenses into master

What does this MR do?

Related to #333870

This MR fixes 3 bugs related to syncing or activating a cloud licenses:

  • Fixes a bug in the SyncSeatLinkRequestWorker where the current license was not being deleted when the new license was created. This was happening despite being tested in specs but did not work in development. This appears to be a problem with the way License.current uses caching. The .destroy! method did not actually delete the record from the DB outside of the test environment. In this MR, the fix instead deletes all existing cloud licenses uses delete_all.
  • Applies a similar fix for removing old cloud licenses to the ActivateService. Previously if an instance attempted to activate multiple time, this would lead to multiple cloud licenses.
  • Fixes a bug where new licenses created in the ActivateService were not created with the cloud attribute.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

Merge request reports

Loading