Allow license providers to update/remove multiple licenses at once.

Review Request #14460 — Created June 18, 2025 and submitted

Information

Review Board
release-7.1.x

Reviewers

The license update support is no longer limited to updating just the
information for the license being checked. Now, a license provider can
update the license information for multiple licenses at once when
returning a license payload, and can also remove licenses.

This enables a license provider to represent a main license with
multiple sub-licenses and then update or remove sub-licenses based on
the new license data, without having to do processing per-license.

To do this, the license provider's check license response now sets a
license_infos dictionary mapping license IDs to either payload data
(to add or update) or null (to remove). This is then handled on the
JavaScript side by updating all licenses from that provider that match
the ID.

Each license provider's set of licenses are managed client-side in a new
LicenseCollection, which performs those batch updates and also takes
care of performing a group of license update checks. These are now
checked sequentially instead of all at once.

Unit tests pass.

Tested this with the license support in Power Pack.

Summary ID
Allow license providers to update/remove multiple licenses at once.
The license update support is no longer limited to updating just the information for the license being checked. Now, a license provider can update the license information for multiple licenses at once when returning a license payload, and can also remove licenses. This enables a license provider to represent a main license with multiple sub-licenses and then update or remove sub-licenses based on the new license data, without having to do processing per-license. To do this, the license provider's check license response now sets a `license_infos` dictionary mapping license IDs to either payload data (to add or update) or `null` (to remove). This is then handled on the JavaScript side by updating all licenses from that provider that match the ID. Each license provider's set of licenses are managed client-side in a new `LicenseCollection`, which performs those batch updates and also takes care of performing a group of license update checks. These are now checked sequentially instead of all at once.
d59294bdc7adc23c3b4f9d6510fedc14b6485ad2
Description From Last Updated

'collections.abc.Sequence' imported but unused Column: 5 Error code: F401

reviewbotreviewbot

I think this can be imported as type LicenseCheckStatus

daviddavid

This isn't used in this file.

daviddavid

Missing a trailing comma.

daviddavid

Missing a trailing comma.

daviddavid
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
david
  1. 
      
  2. Show all issues

    I think this can be imported as type LicenseCheckStatus

  3. Show all issues

    This isn't used in this file.

    1. This is used. Though if you meant CheckboxFieldView, that was not. IDE inserted it when trying to reference something.

  4. Show all issues

    Missing a trailing comma.

  5. Show all issues

    Missing a trailing comma.

  6. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-7.1.x (a850f73)