Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve ocm ref parsing #337

Merged
merged 2 commits into from
Apr 16, 2023
Merged

Conversation

mandelsoft
Copy link
Contributor

@mandelsoft mandelsoft commented Apr 14, 2023

What this PR does / why we need it:

localhost or other potentially non DNS like host name parts in OCM ref expressions are not handled
correctly, even if the repository type prefix is given.

To solve the general ref parsing there is already a type UniformRepositorySpec, which holds various
parts of a reference and which is then mapped by heuristics to dedicated repository specs.

The problem here is that these heuristics cannot be unique if the intended type is not known.

Now we add type specific handlers, which can normalize the uniform spec according to the constraints
of the dedicated type.

Additionally, the OCIRegistry handler for mapping of URSs has been extended to handle the Info field, if host is not set,

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release Notes:

@mandelsoft mandelsoft merged commit f2d7576 into open-component-model:main Apr 16, 2023
@mandelsoft mandelsoft deleted the parse branch April 16, 2023 15:32
robertwol pushed a commit that referenced this pull request Sep 25, 2023
* improve ocm ref parsing

* improve OCIRegistry Ref Mapping
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants