Review 14.3 Merged

97502[TASK] Resolve extension packages from TER's FAIR documents

Benni Mack CR +2 V +2 Expert +1743 −132 updated 11/10/26, 09:41

Commit message

Browsing the catalogue went behind ExtensionCatalogueInterface with
exact package a download or an update means still went to the
concrete ExtensionRepository, so a version the catalogue showed but
the imported list did not have could not be installed before the
list was updated.

PackageResolverInterface names that second question: the package a
full remote identity addresses, a single version of an extension, the
newest version offered, and the versions within a range. The two
contracts are kept apart because their callers are: the list views
never resolve, and the download code never browses.

FairPackageResolver answers it from the FAIR metadata document TER
serves at https://extensions.typo3.org/fair/v1/packages/{key}: one
request per extension lists every release with its requirements,
artifact URL and checksum, which is all that resolving needs. The
extensions it hands out keep the "ter" remote, so TerExtensionRemote
fetches the archive and verifies it against the sha256 the document
named. FallbackPackageResolver asks the imported list whenever the
document cannot be read or does not list the version, since a
document carries a limited number of releases. DownloadController
and DistributionController depend on the contract, ExtensionRepository
implements it as before.

The requirement keys of FAIR ("env:typo3", "env:typo3:backend",
"did:web:extensions.typo3.org:rx_shariff") are mapped onto extension
keys, and the version ranges both TER interfaces send as
">=13.4.29 <=14.3.99" are converted by VersionConstraintConverter,
which the REST mapper uses as well. FairPackageClient and TerApiClient
share AbstractJsonApiClient: one cached GET, short timeouts, and a
remote that could not answer is remembered for five minutes.

Extensions read from a FAIR document are marked as resolved from a
remote, so ExtensionManagementService downloads them.

Both fallbacks honour the Extension Manager's offline mode and do not
ask TER at all then, which TerExtensionRemote already did for
downloads. The functional tests of the download flow run in offline
mode for that reason.

ListUtility and DependencyUtility stay on the concrete repository on
purpose. The update check of the extension list would cost one
document per installed extension; POST /extension/versions/check of
the REST API answers that in one request and is the next step.
DependencyUtility's countAll() asks whether the list was imported at
all, which a remote resolver would answer differently.

Review

  • Code review CR +2 Done
    • Benni Mack +2
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 2

Files 28

Show 8 more files

Review log 34

  1. Benni Mack uploaded patch set 1 11/10/26, 09:26

  2. core-ci voted on patch set 1 V +1 11/10/26, 09:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113863

  3. Benni Mack voted on patch set 1 CR +2 V +2 11/10/26, 09:41

  4. Benni Mack merged patch set 2 11/10/26, 09:41