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

name-based registration support for down- und uploader #371

Merged
merged 14 commits into from
May 30, 2023

Conversation

mandelsoft
Copy link
Contributor

@mandelsoft mandelsoft commented May 23, 2023

What this PR does / why we need it:
This PR provides a uniform handling for uploader and downloader registrations
including a registration handler registry to support name-based registrations.

This feature is then used by the CLI to enable on-the fly registrations for
the resource download command (similar to the uploader registration)

The diretree downloader is now available, here, as well as downloaders provided
by plugins.

Additionally a OCI registry upload downloader is added.
It can be used to upload OCI artifacts provided by a component version
directly to an OCI registry using the download command.

A downloader just get control of handling the download of a dedicated resource.
It is his decision what to do. Typically, this should be the placement of the content
on the local filesystem, but basically all kinds of actions and targets are possible.
THis is now used by the oci/artifact downloader to upload the content to an OCI
registry as target.

Additionally, up- and downloader registration now support dedicated
config objects, which can be used to add standard registration per om config file.
The config config object now also supports named configuration sets, which are passive
by default, but can be activated by a central cli option. This way it is possible
to preconfigure dedicated (registration) scenarios, which can easily be activated per
option, instead of adding a list of fully qualified registration options.

Registration handlers now may provide info about available handlers, their names and usage,
This is used by the CLI to provide more help information.

Extend the standard plugin configuration to an option to enable the automatic registrations.
The are now done for downloaders and uploaders. Their descriptors have been extended
to selectively request an automatic registration. Otherwise they are just available for
explicit registrations via the hander namespaces provided by the registration handlers.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release Notes:

fabianburth
fabianburth previously approved these changes May 25, 2023
pkg/contexts/ocm/download/handlers/ocirepo/handler.go Outdated Show resolved Hide resolved
@mandelsoft mandelsoft merged commit 4b053e6 into open-component-model:main May 30, 2023
@mandelsoft mandelsoft deleted the download branch May 30, 2023 09:40
robertwol pushed a commit that referenced this pull request Sep 25, 2023
* download registration handler support

* plugin support for downloader config

* downloader CLI option

* download command tests + fixes to make it run

* plugin autoregistration for downloaders

* plugin config option to disable auto registration

* provide info for possible handlers

* help topic for up- and downloaders

* oci upload downloader

* handler registration per config + config sets

* align blob handler and downloader interface

* rebase to new runtime handling + adapt oci downloader

* assure static linking

* incorporate review
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