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

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

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.
5b4da72a37b80f3a78a46e3773f3797bcb463f30
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
Review request changed
Change Summary:

Removed an unused import.

Testing Done:
  +

Unit tests pass.

  +
  +

Tested this with the license support in Power Pack.

Commits:
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.
27be2d022e9b3114bf2ac53ed231e6a197cb4d7b
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.
5b4da72a37b80f3a78a46e3773f3797bcb463f30

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
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.

  4. Show all issues

    Missing a trailing comma.

  5. Show all issues

    Missing a trailing comma.

  6.