Skip to content

feat: ocm get cv <ctf_dir>#1068

Merged
jakobmoellerdev merged 32 commits into
open-component-model:mainfrom
ikhandamirov:comp-list-cli-get-cv
Oct 31, 2025
Merged

feat: ocm get cv <ctf_dir>#1068
jakobmoellerdev merged 32 commits into
open-component-model:mainfrom
ikhandamirov:comp-list-cli-get-cv

Conversation

@ikhandamirov

@ikhandamirov ikhandamirov commented Oct 20, 2025

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

With this PR the OCM CLI will support ocm get cv <ctf_dir> command.

Which issue(s) this PR fixes

Contributes to open-component-model/ocm-project#675

Signed-off-by: Ilya Khandamirov <ilya.khandamirov@sap.com>
@github-actions github-actions Bot added kind/feature new feature, enhancement, improvement, extension size/m Medium labels Oct 20, 2025
@ikhandamirov

ikhandamirov commented Oct 20, 2025

Copy link
Copy Markdown
Contributor Author

@piotrjanik, this is the the initial version we were talking about today. It runs end-to-end, but the output is ugly, the whole thing needs some refactoring.

At the moment, if component name or component name and version are provided, everything runs as before. If only the path to a dir is provided, a list of components is retrieved first, then the "old" processing is done per component. The latter needs to be changed.

Signed-off-by: Ilya Khandamirov <ilya.khandamirov@sap.com>
Signed-off-by: Ilya Khandamirov <ilya.khandamirov@sap.com>
Signed-off-by: Ilya Khandamirov <ilya.khandamirov@sap.com>
Signed-off-by: Ilya Khandamirov <ilya.khandamirov@sap.com>
Signed-off-by: Ilya Khandamirov <ilya.khandamirov@sap.com>
Signed-off-by: Ilya Khandamirov <ilya.khandamirov@sap.com>
Signed-off-by: Ilya Khandamirov <ilya.khandamirov@sap.com>
Signed-off-by: Ilya Khandamirov <ilya.khandamirov@sap.com>
@ikhandamirov ikhandamirov marked this pull request as ready for review October 23, 2025 15:42
@ikhandamirov ikhandamirov requested a review from a team as a code owner October 23, 2025 15:42
Comment thread cli/cmd/get/component-version/cmd.go Outdated
Comment thread cli/cmd/get/component-version/cmd.go Outdated
Comment thread cli/cmd/get/component-version/cmd.go Outdated
Comment thread cli/internal/repository/ocm/compatibility.go Outdated
Comment thread cli/cmd/get/component-version/cmd.go
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@Skarlso

Skarlso commented Oct 28, 2025

Copy link
Copy Markdown
Contributor

I refactored the New function, please take a look at it.

Comment thread cli/cmd/get/component-version/cmd.go
Comment thread cli/cmd/get/component-version/cmd.go
Comment thread cli/cmd/get/component-version/cmd.go Outdated
Comment thread cli/internal/repository/ocm/compatibility.go Outdated
Comment thread cli/internal/repository/ocm/compatibility.go Outdated
Comment thread cli/internal/repository/ocm/compatibility.go
Comment thread cli/internal/repository/ocm/compatibility.go Outdated
Comment thread cli/cmd/cmd_test.go
Comment thread cli/cmd/cmd_test.go
Comment thread cli/internal/repository/ocm/compatibility.go Outdated
Comment thread cli/internal/repository/ocm/compatibility.go Outdated
@github-actions github-actions Bot added the size/l Large label Oct 30, 2025
Comment thread cli/internal/repository/ocm/compatibility.go
Comment thread cli/internal/repository/ocm/list.go Outdated
Comment thread cli/internal/repository/ocm/list.go Outdated
Comment thread cli/internal/repository/ocm/compatibility.go Outdated
Comment thread cli/internal/repository/ocm/list.go
Comment thread cli/internal/repository/ocm/list.go Outdated
@piotrjanik piotrjanik force-pushed the comp-list-cli-get-cv branch from b793966 to bc5d82f Compare October 30, 2025 22:56
piotrjanik and others added 15 commits October 31, 2025 00:34
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
…iguration types are set simultaneously

Signed-off-by: Piotr Janik <piotr.janik@sap.com>
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
…`ListComponentVersions` function in the OCM repository package that supports filtering and sorting.

Signed-off-by: Piotr Janik <piotr.janik@sap.com>
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
Signed-off-by: Piotr Janik <piotr.janik@sap.com>
@piotrjanik piotrjanik force-pushed the comp-list-cli-get-cv branch from 01c2341 to 8ae962b Compare October 30, 2025 23:35
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Comment thread cli/cmd/get/component-version/cmd.go
Skarlso and others added 2 commits October 31, 2025 07:57
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com>

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>

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

LGTM

@jakobmoellerdev jakobmoellerdev merged commit d60ed0b into open-component-model:main Oct 31, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature new feature, enhancement, improvement, extension size/l Large size/m Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants