Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce optional repository interface for resolvers #867

Merged
merged 4 commits into from
Aug 16, 2024

Conversation

mandelsoft
Copy link
Contributor

@mandelsoft mandelsoft commented Aug 8, 2024

What this PR does / why we need it:

CLI command ocm list componentversions dumps if only a component is specified together with a resolver (either as part of the config or as option).

This PR fixes this dump.

The resolvers are only able to resolve component versions. Therefore, after the fix the provided list does not show any version for the given component. The expected behaviour would surely be to get the list of versions resolvable by the given resolvers.

Not all resolvers are able to provide repositories offering a version list method. Therefore an optional interface is introduced for
resolvers, which provide potential repositories for a given component. This interface offers the possibility to return repositories or abstract component providers which can be used to get versions or version lists.

This is then checked by the list handling to gather versions provided by all found repositories.

Which issue(s) this PR fixes:

Fixes: #864

@mandelsoft mandelsoft added the area/ipcei Important Project of Common European Interest label Aug 8, 2024
@mandelsoft mandelsoft requested a review from ccwienk August 8, 2024 08:18
@mandelsoft mandelsoft changed the title introduce option repository interface for resolvers introduce optional repository interface for resolvers Aug 8, 2024
@hilmarf hilmarf added this to the 2024-Q3 milestone Aug 12, 2024
api/ocm/types/interface.go Outdated Show resolved Hide resolved
Copy link
Member

@hilmarf hilmarf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I bet there is a 'C' missing in: ResolvedomponentVersionProvider

@mandelsoft mandelsoft requested a review from hilmarf August 16, 2024 11:05
@hilmarf hilmarf enabled auto-merge (squash) August 16, 2024 11:21
@hilmarf hilmarf merged commit a7b929b into open-component-model:main Aug 16, 2024
15 checks passed
@mandelsoft mandelsoft deleted the resolvers branch August 16, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ipcei Important Project of Common European Interest
Projects
Status: 🔒Closed
Development

Successfully merging this pull request may close these issues.

unhandled nil-pointer-dereference (ocm list componentversions)
2 participants