Skip to content

Support search on package version that satisfies a set of version constraints #1623

@juliaElastic

Description

@juliaElastic

Relates elastic/kibana#256700 (comment)

While adding support for package dependencies, the kibana Fleet plugin queries all available versions of a package (with the all=true param), to find the latest package version that satisfies a set of version constraints (dependencies required by installed or installable packages).
This is not very efficient, as a package can have many published versions, and the list of all versions will keep growing with time.

To optimise this query, package-registry could support a new search parameter, that would accept a list of semver conditions and return the latest package that satisfies all conditions.

For example:

https://epr.elastic.co/search?package=apache_otel&version_constraints=">=0.1.0,^0.2.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions