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

priority for CLI registration options #1045

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

mandelsoft
Copy link
Contributor

@mandelsoft mandelsoft commented Nov 4, 2024

What this PR does / why we need it

The CLI registration options (--downloader, --uploader) now support an additional optional priority segment.
The new format is <name>[:<artifact type>[:<media type>[:<prio>]]]=<JSON target config>

The priority so far was the default priority also used for the builtin registrations. There competing registrations
from the CLI (or config) were never used.

Therefore

  • the priority can now be specified on the command line
  • the default priority is three times the default priority (300)
  • the default priority for config objects is increased to twice the default priority (200)

Which issue(s) this PR fixes

Fixes #1046

@mandelsoft mandelsoft requested a review from a team as a code owner November 4, 2024 18:23
Copy link
Contributor

@jakobmoellerdev jakobmoellerdev left a comment

Choose a reason for hiding this comment

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

Whats the concrete use case for this? I dont believe we have anyone asking for this (yet). Even if we do Im missing documentation on it (e.g. why would someone want to use it? and how is a priority specified, for example I could only know how it is used after looking into the test cases in code)

@hilmarf hilmarf self-assigned this Nov 5, 2024
@hilmarf hilmarf added this to the 2024-Q4 milestone Nov 5, 2024
@mandelsoft
Copy link
Contributor Author

The problem was reported by @hilmarf . He wanted to register an OCI Uploader, which was never used because of its default priority.

@hilmarf hilmarf linked an issue Nov 5, 2024 that may be closed by this pull request
@hilmarf hilmarf enabled auto-merge (squash) November 5, 2024 10:47
@hilmarf hilmarf added the component/ocm-cli OCM Command Line Interface label Nov 5, 2024
@hilmarf hilmarf merged commit c722d03 into open-component-model:main Nov 5, 2024
18 checks passed
@mandelsoft mandelsoft deleted the prio branch November 5, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/ocm-cli OCM Command Line Interface
Projects
Status: 🔒Closed
Development

Successfully merging this pull request may close these issues.

OCI artifact uploaders aren't used as expected
3 participants