Skip to content

fix(oci): update dependencies to simplified plugin registration#1325

Merged
jakobmoellerdev merged 9 commits into
open-component-model:mainfrom
fabianburth:chore/update-internal-registration-dependencies
Dec 3, 2025
Merged

fix(oci): update dependencies to simplified plugin registration#1325
jakobmoellerdev merged 9 commits into
open-component-model:mainfrom
fabianburth:chore/update-internal-registration-dependencies

Conversation

@fabianburth

@fabianburth fabianburth commented Dec 2, 2025

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

Which issue(s) this PR fixes

Contributes to open-component-model/ocm-project#761

@fabianburth fabianburth requested a review from a team as a code owner December 2, 2025 17:09
@github-actions github-actions Bot added kind/bugfix Bug kind/dependency dependency update, etc. size/m Medium labels Dec 2, 2025
@fabianburth fabianburth force-pushed the chore/update-internal-registration-dependencies branch 2 times, most recently from 6dcad68 to d349ea8 Compare December 2, 2025 17:14
@github-actions github-actions Bot added the size/l Large label Dec 2, 2025
Comment thread kubernetes/controller/cmd/main.go Outdated
Comment thread kubernetes/controller/cmd/main.go Outdated
Comment on lines +166 to +167
repospec.MustAddToScheme(scheme)
repospec.MustAddLegacyToScheme(scheme)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This won't work, see #1284

Thats why we added it previously so cumbersome:

	repositoryScheme.MustRegisterWithAlias(&ociv1.Repository{},
		runtime.NewVersionedType(ociv1.Type, ociv1.Version),
		runtime.NewUnversionedType(ociv1.Type),
		runtime.NewVersionedType(ociv1.ShortType, ociv1.Version),
		runtime.NewUnversionedType(ociv1.ShortType),
		runtime.NewVersionedType(ociv1.ShortType2, ociv1.Version),
		runtime.NewUnversionedType(ociv1.ShortType2),
		runtime.NewVersionedType(ociv1.LegacyRegistryType, ociv1.Version),
		runtime.NewUnversionedType(ociv1.LegacyRegistryType),
		runtime.NewVersionedType(ociv1.LegacyRegistryType2, ociv1.Version),
		runtime.NewUnversionedType(ociv1.LegacyRegistryType2),
	)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we probably need that too for the unit-tests, e.g. in suite_test.go if we will add compatibility tests at some point. that's why I created Register function in plugins before

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

great

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i guess now it worked because the tests consistently use the legacy type and i happened to be calling the legacy type registration later

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I hope now it is fixed

frewilhelm
frewilhelm previously approved these changes Dec 3, 2025
jakobmoellerdev
jakobmoellerdev previously approved these changes Dec 3, 2025
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Updated the internal registration of signing and credential repository plugins to ensure proper functionality and error handling. This includes adjustments to the signature algorithm handling and the registration process for the new plugins.

Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
@fabianburth fabianburth force-pushed the chore/update-internal-registration-dependencies branch from 72459ab to a855fe5 Compare December 3, 2025 12:04
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
@jakobmoellerdev jakobmoellerdev merged commit b2b287d into open-component-model:main Dec 3, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bugfix Bug kind/dependency dependency update, etc. size/l Large size/m Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants