Skip to content

fix(615): ocm get cv fails#753

Merged
jakobmoellerdev merged 6 commits into
open-component-model:mainfrom
matthiasbruns:fix/615-ocm-get-cv-failsa
Sep 1, 2025
Merged

fix(615): ocm get cv fails#753
jakobmoellerdev merged 6 commits into
open-component-model:mainfrom
matthiasbruns:fix/615-ocm-get-cv-failsa

Conversation

@matthiasbruns

@matthiasbruns matthiasbruns commented Aug 30, 2025

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

ocm get cv fails with components in oci registries without specifying port.

for urls like ghcr.io in ocm get cv the credentialCache fails due to using net.SplitHostPort on the url without a port.

This PR adds a fallback to 443 in those cases and updates the tests.

Which issue(s) this PR fixes

Fixes #615

Copilot AI review requested due to automatic review settings August 30, 2025 05:25
@matthiasbruns matthiasbruns requested a review from a team as a code owner August 30, 2025 05:25
@github-actions github-actions Bot added the component/github-actions Changes on GitHub Actions or within `.github/` directory label Aug 30, 2025
@matthiasbruns matthiasbruns changed the title Fix/615 ocm get cv failsa fix(615): ocm get cv failsa Aug 30, 2025

Copilot AI left a comment

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.

Pull Request Overview

This PR fixes an issue where ocm get cv fails by improving the handling of host:port parsing in the credential cache. The main change adds proper error handling for cases where a host is provided without a port number, defaulting to port 443 in such scenarios.

  • Enhanced credential cache to handle hosts without explicit ports by defaulting to port 443
  • Added proper error checking using errors.As to identify address parsing errors
  • Updated wordlist with various technical terms

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
bindings/go/oci/repository/provider/credential_cache.go Added error handling for host:port parsing with default port fallback
.github/config/wordlist.txt Added various technical terms to the allowed wordlist

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread bindings/go/oci/repository/provider/credential_cache.go Outdated
@matthiasbruns matthiasbruns force-pushed the fix/615-ocm-get-cv-failsa branch from 8f54808 to 4d7a908 Compare August 30, 2025 05:26
On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@github-actions github-actions Bot added the size/xs Extra small label Aug 30, 2025
On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns reopened this Aug 30, 2025
Comment thread bindings/go/oci/repository/provider/credential_cache.go
@matthiasbruns matthiasbruns changed the title fix(615): ocm get cv failsa fix(615): ocm get cv fails Sep 1, 2025
matthiasbruns and others added 2 commits September 1, 2025 08:36
On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
Comment thread bindings/go/oci/repository/provider/credential_cache.go Outdated
On-behalf-of: SAP <matthias.bruns@sap.com>

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
…open-component-model into fix/615-ocm-get-cv-failsa
@jakobmoellerdev jakobmoellerdev merged commit 5b70484 into open-component-model:main Sep 1, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/github-actions Changes on GitHub Actions or within `.github/` directory kind/bugfix Bug size/s Small size/xs Extra small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants