feat: 1047 typed credentials - full migration path#2599
Closed
jakobmoellerdev wants to merge 29 commits into
Closed
feat: 1047 typed credentials - full migration path#2599jakobmoellerdev wants to merge 29 commits into
jakobmoellerdev wants to merge 29 commits into
Conversation
❌ Deploy Preview for ocm-website failed. Why did it fail? →
|
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced May 21, 2026
piotrjanik
added a commit
to piotrjanik/open-component-model
that referenced
this pull request
May 21, 2026
… into feat/1043 The branch had merged main mid-way through the credentials map[string]string -> runtime.Typed migration, leaving the Go workspace internally inconsistent and unable to build (cli and kubernetes/controller). Merging open-component-model#2599 ("feat: 1047 typed credentials - full migration path") brings the completed migration so all binding modules agree on the credentials API. Conflicts (all in bindings/go/constructor, migration-only, resolved in favour of open-component-model#2599): - construct.go provider.ResolveTyped -> provider.Resolve - construct_resource_test.go mockCredentialProvider.Resolve returns runtime.Typed - go.mod / go.sum credentials v0.0.11 -> v0.0.12 Verified: `go build ./...` is clean for cli and kubernetes/controller; `go vet` is clean for the bindings/go/oci/integration module. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jakobmoellerdev
added a commit
that referenced
this pull request
May 22, 2026
…credentials (gate 5) (#2602) ## Summary Gate 5 of the typed credentials migration (#1047). Migrates `plugin`, `constructor`, and `input/*` modules from `map[string]string` to `runtime.Typed` credentials. This continues the series started in gates 1-4 (blob, signing, rsa, repository, sigstore, oci, constructor published as PR #2598). ### Modules changed | Module | Change | |--------|--------| | `bindings/go/constructor` | `Resolver.Resolve` return type `map[string]string` → `runtime.Typed`; bump credentials v0.0.11→v0.0.12 | | `bindings/go/input/dir` | `ProcessResource`/`ProcessSource` credentials param `map[string]string` → `runtime.Typed` | | `bindings/go/input/file` | same | | `bindings/go/input/utf8` | same | | `bindings/go/plugin` | All contract interfaces, registry implementations, handlers, converters, test plugins | ### Key design decisions - **Client side** (`toCredentials`): `nil` credentials → sends `"{}"` JSON to preserve valid Authorization header format - **Server side** (handlers): deserialize Authorization header into `&runtime.Raw{}` since concrete type is unknown at HTTP boundary - **`plugin/go.mod`**: uses `replace` directive pointing to local `../constructor` (gate 5 constructor not yet released as module tag) ### Related issues - Part of #1047 (typed credentials migration) - Supersedes draft PR #2599 ## Test plan - [x] `go build ./...` passes in all 5 affected modules - [x] `go test ./...` passes in `constructor`, `input/dir`, `input/file`, `input/utf8` - [x] `go test ./...` passes in `plugin` (96 files changed, all registry/handler/flow tests pass) - [ ] Integration tests with downstream modules (gates 6-8 not yet migrated) --------- Signed-off-by: Jakob Möller <contact@jakob-moeller.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com> # Conflicts: # bindings/go/plugin/manager/registries/componentversionrepository/handlers.go # bindings/go/plugin/manager/registries/componentversionrepository/implementations.go # bindings/go/plugin/manager/registries/componentversionrepository/implementations_test.go # bindings/go/plugin/manager/registries/input/implementations_test.go # bindings/go/plugin/manager/registries/input/registry_test.go # bindings/go/plugin/manager/registries/resource/contract.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_test.go # bindings/go/plugin/manager/registries/signinghandler/handlers_test.go # bindings/go/plugin/manager/registries/signinghandler/implementations.go # bindings/go/plugin/manager/registries/signinghandler/implementations_test.go
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
On-behalf-of: SAP <matthias.bruns@sap.com> Signed-off-by: Matthias Bruns <git@matthiasbruns.com> On-behalf-of: @SAP <jakob.moeller@sap.com>
Update oci module from v0.0.40/v0.0.41 to v0.0.43 in cli, cli/integration, transfer, and helm modules. Also remove intermediate FromDirectCredentials and FromTyped helpers from oci/spec/credentials/v1/oci_credentials.go that referenced deleted symbols; ConvertToOCICredentials in convert.go is the correct public API. On-behalf-of: @SAP <jakob.moeller@sap.com>
af0664b to
3e75ee6
Compare
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
This PR basically migrates the whole code-base to the final state of credentials including cli and controllers.
runtime.Typedinto typed credentials in the bindings where neededWhich issue(s) this PR fixes
Contributes:
Binding release order
Dependency graph (changed → changed only):
blob → (none)
signing → (none)
rsa → (none)
sigstore → signing
repository → blob, credentials
oci → blob, credentials, repository
constructor → blob, credentials, oci, repository
plugin → blob, constructor, credentials, repository, signing
input/dir → blob, constructor, credentials, repository
input/file → blob, constructor, credentials, repository
input/utf8 → blob, constructor, credentials, repository
helm → blob, constructor, credentials, oci, plugin, repository
transfer → blob, credentials, helm, oci, repository, signing
PR plan: