Skip to content

feat(provider): simplify internal plugin registration#1228

Closed
fabianburth wants to merge 14 commits into
open-component-model:mainfrom
fabianburth:feat/self-registering-providers
Closed

feat(provider): simplify internal plugin registration#1228
fabianburth wants to merge 14 commits into
open-component-model:mainfrom
fabianburth:feat/self-registering-providers

Conversation

@fabianburth

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

This pull requests adjust the internal plugin registration implementation to fetch the types from the provider instead of having to provide the types explicitly.

Which issue(s) this PR fixes

open-component-model/ocm-project#761

@github-actions github-actions Bot added kind/feature new feature, enhancement, improvement, extension size/m Medium labels Nov 18, 2025
@fabianburth fabianburth force-pushed the feat/self-registering-providers branch from bc451cf to 560d619 Compare November 18, 2025 15:44
This method allows retrieval of the component version repository scheme
for simplifying plugin registry registration.

Signed-off-by: Fabian Burth <fabian.burth@sap.com>
This method allows retrieval of the resource repository scheme from the plugin itself
for simplifying plugin registry registration.

Signed-off-by: Fabian Burth <fabian.burth@sap.com>
@fabianburth fabianburth force-pushed the feat/self-registering-providers branch from 560d619 to 5247399 Compare November 19, 2025 10:08
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
This change introduces the GetSigningHandlerScheme method to the
pluginConverter and Handler types, allowing retrieval of the
associated runtime scheme. Additionally, the RegisterInternalComponentSignatureHandler
method has been updated to utilize the new method for improved
plugin registration.

Signed-off-by: Fabian Burth <fabian.burth@sap.com>
@github-actions github-actions Bot added the size/l Large label Nov 19, 2025
…thodScheme methods

This update introduces new methods to retrieve the input method schemes for resources and sources, enhancing the flexibility of input handling in the provider.

Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Renamed GetResourceInputMethodScheme and GetSourceInputMethodScheme
to GetInputMethodScheme for consistency across the provider interface.

Signed-off-by: Fabian Burth <fabian.burth@sap.com>
This method allows retrieval of the resource repository scheme
from the digest processor plugin, enhancing the plugin's
capabilities for resource management.

Signed-off-by: Fabian Burth <fabian.burth@sap.com>
This method provides a new way to retrieve the credential repository scheme
for plugins, enhancing the flexibility of credential management.

Signed-off-by: Fabian Burth <fabian.burth@sap.com>
This method allows retrieval of the component version repository scheme,
enhancing the functionality of the component lister registry.

Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Implement GetTransformerScheme method in multiple files to provide a unified way to retrieve the transformer scheme.

Signed-off-by: Fabian Burth <fabian.burth@sap.com>
@fabianburth

Copy link
Copy Markdown
Contributor Author

I discussed with @jakobmoellerdev that we thin external plugin converters might never need a scheme (as we cannot know their go types anyway).
However, I think at least the component version converter do still need the scheme as they might need to default the type of resource accesses contained in the component descriptor.

@fabianburth fabianburth force-pushed the feat/self-registering-providers branch from cdbfabf to d241c48 Compare November 20, 2025 11:59
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
@fabianburth fabianburth force-pushed the feat/self-registering-providers branch from d241c48 to 27a0bbf Compare November 20, 2025 12:14
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
@fabianburth

Copy link
Copy Markdown
Contributor Author

This PR is essentially ready for review. I will just have to factor it out into pull requests for the individual dependent modules.

fabianburth added a commit that referenced this pull request Nov 27, 2025
…1268)

<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it
Added methods to retrieve the runtime scheme in multiple components,
preparing for simpler internal plugin registration.

If you feel like you are lacking context for some of the changes in this
PR, it is part of this larger
[PR](#1228).

#### Which issue(s) this PR fixes
<!--
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Contributes to
open-component-model/ocm-project#761

---------

Signed-off-by: Fabian Burth <fabian.burth@sap.com>
# Conflicts:
#	bindings/go/plugin/manager/registries/blobtransformer/contract.go
#	bindings/go/plugin/manager/registries/componentlister/contract.go
#	bindings/go/plugin/manager/registries/componentversionrepository/contract.go
#	bindings/go/plugin/manager/registries/credentialrepository/contract.go
#	bindings/go/plugin/manager/registries/digestprocessor/contract.go
#	bindings/go/plugin/manager/registries/input/contract.go
#	bindings/go/plugin/manager/registries/resource/contract.go
#	bindings/go/plugin/manager/registries/signinghandler/contract.go
@fabianburth

Copy link
Copy Markdown
Contributor Author

Completed with other PRs.

@fabianburth fabianburth closed this Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature new feature, enhancement, improvement, extension size/l Large size/m Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant