feat: add component version command#189
Merged
jakobmoellerdev merged 136 commits intoJul 7, 2025
Merged
Conversation
Member
Author
|
Im creating this PR here to start preparing and testing the constructor lib, but this wont be merged for a bit. |
This sets up the default constructor library It is the implementation that is used whenever constructing components with our go bindings. This is a barebones implementation without any input method. This means that by default, it cannot process anything. Only by adding input methods will it become more powerful. This extension is made possible through the plugin manager / integration with the various provider interfaces (see options.go)
# Conflicts: # bindings/go/constructor/construct.go # bindings/go/constructor/construct_resource_test.go # bindings/go/constructor/construct_source_test.go # bindings/go/constructor/construct_test.go # bindings/go/constructor/input_method_registry.go # bindings/go/constructor/input_method_registry_test.go # bindings/go/constructor/interface.go # bindings/go/constructor/options.go # bindings/go/constructor/spec/v1/resources/schema-2020-12.json
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> On-behalf-of: @SAP gergely.brautigam@sap.com
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> On-behalf-of: @SAP gergely.brautigam@sap.com
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> On-behalf-of: @SAP gergely.brautigam@sap.com
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> On-behalf-of: @SAP gergely.brautigam@sap.com
Skarlso
reviewed
Jul 2, 2025
Skarlso
left a comment
Contributor
There was a problem hiding this comment.
I have some initial comments and questions with a first run-through. :)
Skarlso
reviewed
Jul 3, 2025
Skarlso
reviewed
Jul 3, 2025
Skarlso
reviewed
Jul 3, 2025
Skarlso
reviewed
Jul 3, 2025
Skarlso
left a comment
Contributor
There was a problem hiding this comment.
Just a couple of questions really, nothing major. I think this is looking awesome now.
fabianburth
reviewed
Jul 4, 2025
ikhandamirov
pushed a commit
to ikhandamirov/open-component-model
that referenced
this pull request
Jul 8, 2025
* feat: add component version command * feat: component constructor library This sets up the default constructor library It is the implementation that is used whenever constructing components with our go bindings. This is a barebones implementation without any input method. This means that by default, it cannot process anything. Only by adding input methods will it become more powerful. This extension is made possible through the plugin manager / integration with the various provider interfaces (see options.go) * chore: fixup * chore: fixup * feat: start adding the basics of constructor registries Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> On-behalf-of: @SAP gergely.brautigam@sap.com * simplified the registry map holding various plugin types Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> On-behalf-of: @SAP gergely.brautigam@sap.com * add tests, endpoint and implementation and handlers Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * finally fixed all the tests Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * lint fixes Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * fix: registry contracts * chore: fixup the input method repository plugin * feat: start building out separate digest processor contract * feat: generate resource registry * chore: remove resource repo from comp version contract * chore: fixup contracts * feat: pass through plugins to constructor * feat: finally start connecting all the dots * feat: finally start connecting all the dots * feat: add scheme copy option * feat: start adding the basics of constructor registries Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> On-behalf-of: @SAP gergely.brautigam@sap.com * simplified the registry map holding various plugin types Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> On-behalf-of: @SAP gergely.brautigam@sap.com * add tests, endpoint and implementation and handlers Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * finally fixed all the tests Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * lint fixes Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * fix: registry contracts * chore: fixup the input method repository plugin * feat: start building out separate digest processor contract * feat: generate resource registry * chore: remove resource repo from comp version contract * added tests and fixed up the handler; registry and plugin incoming next Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * added a registry test and a test plugin for digester Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * extending the test cases Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * try working on surfacing the contracts instead of the plugin contracts Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * adding conversion to digester Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * chore: increase test coverage and add comments Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * added some missing comments Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * Merge remote-tracking branch 'refs/remotes/skarlso/add-construct-registry' into add-cv # Conflicts: # bindings/go/plugin/Taskfile.yml # bindings/go/plugin/internal/testplugin-input/main.go # bindings/go/plugin/manager/contracts/digestprocessor/v1/contract.go # bindings/go/plugin/manager/contracts/digestprocessor/v1/doc.go # bindings/go/plugin/manager/contracts/input/v1/types.go # bindings/go/plugin/manager/contracts/resource/v1/contracts.go # bindings/go/plugin/manager/contracts/resource/v1/types.go # bindings/go/plugin/manager/manager.go # bindings/go/plugin/manager/registries/componentversionrepository/handlers.go # bindings/go/plugin/manager/registries/digestprocessor/endpoints_function.go # bindings/go/plugin/manager/registries/digestprocessor/handlers.go # bindings/go/plugin/manager/registries/digestprocessor/implementations.go # bindings/go/plugin/manager/registries/digestprocessor/registry.go # bindings/go/plugin/manager/registries/input/implementations.go # bindings/go/plugin/manager/registries/input/registry.go # bindings/go/plugin/manager/registries/input/registry_test.go # bindings/go/plugin/manager/registries/resource/endpoints_function.go # bindings/go/plugin/manager/registries/resource/implementations.go # bindings/go/plugin/manager/registries/resource/implementations_test.go # bindings/go/plugin/manager/registries/resource/registry.go # bindings/go/plugin/manager/registries/resource/registry_test.go # bindings/go/plugin/manager/types/types.go # bindings/go/runtime/registry.go # cli/cmd/generate/docs/cmd.go # cli/cmd/get/component-version/cmd.go # cli/internal/enum/flag.go # cli/internal/flag/enum/flag.go # cli/internal/flag/log/flag.go # cli/internal/flags/enum/flag.go * chore: refactor memory blob implementation reduces one abstraction layer from the memory blob implementation so that it is easier to debug and use. separates the memory blob implementation from the actual blob interface * feat: start adding the basics of constructor registries Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> On-behalf-of: @SAP gergely.brautigam@sap.com * simplified the registry map holding various plugin types Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> On-behalf-of: @SAP gergely.brautigam@sap.com * add tests, endpoint and implementation and handlers Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * finally fixed all the tests Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * lint fixes Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * fix: registry contracts * chore: fixup the input method repository plugin * feat: start building out separate digest processor contract * feat: generate resource registry * chore: remove resource repo from comp version contract * added tests and fixed up the handler; registry and plugin incoming next Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * added a registry test and a test plugin for digester Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * extending the test cases Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * try working on surfacing the contracts instead of the plugin contracts Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * adding conversion to digester Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * chore: increase test coverage and add comments Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * added some missing comments Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * using the new construction package Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * feat: latest changes to interfaces and finally easier plugin interfaces * chore: fixup input registry * fix: make sure to use correct blobs * fix: fixup input registry * fix: fixup constructor * fix: fixup cache location * fix: fixup repository * fix: fixup incorrect conflict strategy * fix: fixup plugin lookup to use correct defaulting and type derivation this changes the lookup of the input plugins tro be based purely on the type, and not the prototype that is registered. * fix: also register all aliases * feat: add converter for the resource registry Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * feat: add converter for the resource registry Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * fix: ensure CTF artifact index is properly updated without conflicts or duplicates currently CTF indexes were not maintained correctly because there were cases in which duplicates could show up. This is has now been corrected and tested * fix the test Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * adding upload/download resource contract and implementation Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * chore: bumps * make the external interface read-only Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> * chore: bump after merge * chore: merge back * chore: fixup * fix: fixup index lookup resolved manifests never contain artifact types. as such we have to loosen up our tag resolver so that it can deal with any arbitrary tag * fix: do not do gc on referrers index for compatibility with non Artifact Compliant Manifests such as ghcr * fix: add cred graph to resource repo as well as remove unneeded scheme * feat: introduce digest processing on reference * feat: add dynamic construction logs and progress indicators * chore: cleanup logging and introduce log based progress tracking * fix: ensure runtime is able to deal with generic value sets * chore: fixup oci * chore: fixup constructor * chore: fixup inbuilt * feat: introduce file input method * feat: introduce file input method * feat: introduce file input method * feat: introduce file input method * feat: introduce file input method * feat: allow construction with complex types * fix: make sure that OCI lib expects only already converted accesses. because we only use the runtime package in OCI repositories, we shouldn't need to deal with crazy raw to type conversions. Instead any caller should have preconverted types that we assert on * fix: make sure that OCI lib expects only already converted accesses. because we only use the runtime package in OCI repositories, we shouldn't need to deal with crazy raw to type conversions. Instead any caller should have preconverted types that we assert on * fix: fixup constructor * chore: rebase * chore: rebase * chore: prep command * chore: remove unneeded sleep * chore: remove unneeded baseurl based repo caching * chore: add warning to the credential consumer identity lookup * chore: make sure tracker exists * fix: make sure trackers are threadsafe * chore: pr comments * chore: bump libs * chore: bump libs * chore: pr review * chore: pr review * chore: pr review --------- Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> Co-authored-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> Signed-off-by: Ilya Khandamirov <ilya.khandamirov@sap.com>
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.
What this PR does / why we need it
see
docs/reference/cli/ocm_add_component-version.mdfor more detailsWhich issue(s) this PR fixes
fix open-component-model/ocm-project#491