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

extend blobhandler context/registration with artifact type #170

Merged
merged 1 commit into from
Nov 3, 2022

Conversation

mandelsoft
Copy link
Contributor

@mandelsoft mandelsoft commented Oct 31, 2022

What this PR does / why we need it:

A blob handler is responsible for storing local blobs in an alternate way.
For example, in a OCI registry backend for OCM repositories, local blobs describing an OCI artifact are exploded and stored as regular OCI artifacts, again. The access spec in the CD is adapted accordingly.

Therefore a blob handler gets a storage context describing the technical target repository and the blob (including its mime type). It then decides whether it will handle the blob or not. If yes, it has to return an appropriate access spec usable to access the content.

Similar is the registration, handlers are registered for implementation repositories types and mime types.
Both is optional. Even if a registration constraint matches, the handler may reject the handling of a given blob.
To solve this all matching handler are called in a prioritized order until a handler feels responsible.

All this is sufficient, to support backing technologies to provide appropriate blobs in their native formats (like the OCI artifacts) if transported content reaches it.

To support more specific handlers with the plugin concept, it would be useful to support matches for dedicated artifact types, also. This would enable automatically upload imported content directly to intended target repositories (not equal to the OCM repository) (for example a maven repo GAV content could be propagated to a local Maven repository. This is introduced with this PR, in preparation for the connections with plugins.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

@mandelsoft mandelsoft requested a review from jensh007 October 31, 2022 14:31
@mandelsoft mandelsoft marked this pull request as ready for review November 2, 2022 08:47
@mandelsoft mandelsoft merged commit 83c8973 into open-component-model:main Nov 3, 2022
@mandelsoft mandelsoft deleted the blobhandler branch November 3, 2022 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants