Skip to content

fix(1776): ctf detection on windows absolute paths#1792

Merged
matthiasbruns merged 15 commits into
open-component-model:mainfrom
matthiasbruns:fix1776_windows_paths_detected_as_urls
Mar 3, 2026
Merged

fix(1776): ctf detection on windows absolute paths#1792
matthiasbruns merged 15 commits into
open-component-model:mainfrom
matthiasbruns:fix1776_windows_paths_detected_as_urls

Conversation

@matthiasbruns

@matthiasbruns matthiasbruns commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

This PR fixed a problem in repository type detection for windows absolute paths.
In compref.go, --repository was detected as *ociv1.Repository which should actually be detected as ctfv1.Repository.

Unit tests have been added, but I will test this on a windows vm to ensure, that this fixes the issue

Which issue(s) this PR fixes

Fixes: #1776

@matthiasbruns matthiasbruns force-pushed the fix1776_windows_paths_detected_as_urls branch from 58165ee to fecd23f Compare February 17, 2026 14:26
@matthiasbruns matthiasbruns marked this pull request as ready for review February 18, 2026 14:52
@matthiasbruns matthiasbruns requested a review from a team as a code owner February 18, 2026 14:52
Skarlso
Skarlso previously approved these changes Feb 18, 2026

@Skarlso Skarlso 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.

Looks okay. :D

@matthiasbruns

Copy link
Copy Markdown
Contributor Author

it works

C:\Users\win10\Downloads>ocm.exe add component-version --constructor C:\Users\win10\Downloads\backend-constructor.yaml --repository C:\Users\win10\Downloads\ctf
time=2026-02-19T14:12:26.018Z level=WARN msg="could not get credential consumer identity for component version repository" repository=C:\Users\win10\Downloads\ctf error="failed to get component version repository: cannot resolve consumer identity for ctf: credentials not supported"
 COMPONENT                      │ VERSION │ PROVIDER
────────────────────────────────┼─────────┼──────────────
 ocm.software/tutorials/backend │ 1.0.0   │ ocm.software

Comment thread cli/internal/reference/compref/compref.go
@github-actions github-actions Bot added component/github-actions Changes on GitHub Actions or within `.github/` directory size/m Medium labels Feb 19, 2026
@matthiasbruns matthiasbruns force-pushed the fix1776_windows_paths_detected_as_urls branch 4 times, most recently from e4f1bbf to d6f8eb2 Compare February 20, 2026 07:02
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns force-pushed the fix1776_windows_paths_detected_as_urls branch from 5364df6 to 7dfd2df Compare February 20, 2026 09:00
Comment thread cli/docs/reference/windows-support.md Outdated
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
matthiasbruns added a commit to open-component-model/ocm-website that referenced this pull request Feb 20, 2026
#### What this PR does / why we need it
This PR is a result of the discussions on
open-component-model/open-component-model#1792

We want to notify windows users installing ocm cli, that we provide a
best-effort support at best.

#### Which issue(s) this PR fixes
Contributes:
open-component-model/open-component-model#1776

---------

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
Signed-off-by: Matthias Bruns <github@matthiasbruns.com>
Co-authored-by: Gerald Morrison <67469729+morri-son@users.noreply.github.com>
ocmbot Bot pushed a commit to open-component-model/ocm-website that referenced this pull request Feb 20, 2026
#### What this PR does / why we need it
This PR is a result of the discussions on
open-component-model/open-component-model#1792

We want to notify windows users installing ocm cli, that we provide a
best-effort support at best.

#### Which issue(s) this PR fixes
Contributes:
open-component-model/open-component-model#1776

---------

Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
Signed-off-by: Matthias Bruns <github@matthiasbruns.com>
Co-authored-by: Gerald Morrison <67469729+morri-son@users.noreply.github.com> 1b6d8f5
@matthiasbruns matthiasbruns enabled auto-merge (squash) February 20, 2026 15:31
Comment thread cli/internal/reference/compref/compref.go
Comment thread cli/internal/reference/compref/compref.go
Comment thread cli/internal/reference/compref/compref.go
Comment thread cli/internal/reference/compref/compref.go
matthiasbruns and others added 2 commits February 25, 2026 09:11
On-behalf-of: SAP <matthias.bruns@sap.com>
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns merged commit 13b0f76 into open-component-model:main Mar 3, 2026
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/m Medium size/s Small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

failed to parse repository URI on Windows

4 participants