feat(lib-cloudinfo): add ProductsQuery for sched/nvme filters#61
Merged
Conversation
Expose the sched and nvme query parameters introduced in seqeralabs/cloudinfo#48 via a new ProductsQuery options object and a getProducts(provider, region, ProductsQuery) overload on CloudInfoClient. The existing two-argument getProducts method is preserved and now delegates to the new overload. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…ct capability tokens CloudProduct gains a List<String> features field carrying the per-product capability tokens advertised by the CloudInfo backend (SCHED, NVME, GPU, family-type, etc.). Consumers map these strings onto a domain-specific enum (e.g. the platform's Feature enum on InstanceType). Null preserves backward compatibility for older backend versions that do not populate the field; an empty list explicitly means "no features advertised". Folded into the unreleased 1.1.0 entry of changelog.txt (no version bump). README's CloudProduct row reflects the new field. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
alberto-miranda
approved these changes
May 6, 2026
munishchouhan
approved these changes
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Surfaces the
schedandnvmequery parameters introduced in seqeralabs/cloudinfo#48 throughlib-cloudinfo, and adds a forward-lookingfeaturesfield onCloudProduct.ProductsQueryoptions object (io.seqera.cloudinfo.api) with a hand-rolled builder, matching the existingCloudInfoClient.Builderstyle.CloudInfoClient.getProducts(provider, region, ProductsQuery)overload. The existing 2-arggetProductsis preserved and delegates to the new overload — backwards compatible.nullquery is equivalent to calling the 2-arg overload.CloudProduct.features(List<String>) field for per-product capability tokens (e.g.SCHED,NVME,family-type:general-purpose).lib-cloudinfoto1.1.0; changelog + README updated.Note on
featurespopulationThe
featuresfield is introduced as a forward-looking placeholder, not populated yet. The cloudinfo backend does not emit it today, soCloudProduct.featuresdeserialises tonullfor every product. We're adding the field inlib-cloudinfoahead of time because we already know this is the direction we want to go — with cloudinfo as the single source of truth for instance-type capabilities, and consumers reading capability tokens off each product rather than combining separate filter calls.The actual computation and population of
features(across providers and capabilities) will land in follow-up cloudinfo efforts. Once cloudinfo emits the field, no client-side change is required — the DTO is already wired.Usage
Test plan
./gradlew :lib-cloudinfo:compileJava :lib-cloudinfo:compileTestGroovy— clean./gradlew :lib-cloudinfo:test— passing, including:should fetch products with null query equal to no queryshould filter products with sched=true to a subsetshould filter products with nvme=true to a subsetshould return all products for unconfigured provider when filters set(usesgoogle)featuresfield round-trip / null / empty / equals-hashCode coverage onCloudProductcloudinfo.seqera.ioand confirm PR Add multi-token support for HxClient #48 is deployed (filters reduce the AWS product set;googleis unaffected).