vmware-labs / marketplace-cli

A CLI for interacting with the VMware Marketplace
Other
11 stars 2 forks source link

If the semver latest differs from server latest, we may get wrong data #80

Closed petewall closed 2 years ago

petewall commented 2 years ago

The Marketplace CLI orders versions by semver. The Marketplace server orders versions by creation time. This means if these versions are created in this order: 1.0.0, 2.0.0, 1.0.1, then the cli will treat 2.0.0 as the latest, but the server will treat 1.0.1 as the latest.

Some of the data in the product payload is tied to the latest version (server-wise). If the two different latest versions disagree, we should fetch using the /api/v1/products/{productId}/version-details?versionNumber-2.0.0 API to get the version specific details, merge in the results, and set currentVersion to the specific version.