Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

GRIF-209: refactor products-contains-component output and added --include-container-roots #281

Merged
merged 8 commits into from
Jan 18, 2024

Conversation

JimFuller-RedHat
Copy link
Collaborator

@JimFuller-RedHat JimFuller-RedHat commented Jan 17, 2024

a heavy refactor of output from services products-contains-components

verbosity product root child other comment
product version nvr default verbosity using product versions
-v product stream nvr (type) [ name {versions} ({types}), ... ] uses product streams includes children summarising versions, types
-vv product stream nvr (type:arch) [ name {versions} ({types}:{arches}), ... ] related_url, build_source_url include children summarising versions, types, arches with urls
-vvv product stream nvr (type:arch) [ nvr (type:arch), ... ] related_url, build_source_url list each child using nvr (type:arch)
-vvvv product stream purl [purl, ... ] related_url, build_source_url list everything with purls

where the -v and -vv options summarise versions, types and arches of children components. The -vvv option lists out each child component without summarising. The -vvvv option emits purls.

also

  • added a new flag, --include-container-roots, as we now default exclude root containers from output.
  • added a new flag, --exclude-unreleased, to narrow down output to only released components.

@JakubFrejlach
Copy link
Collaborator

Tested and it works great. Table nicely corresponds with the actual output. One problem might be when using middleware CLI from Griffon for Maven stuff I get:

    if obj["purl"] not in seen:
KeyError: 'purl'

Might need some special handling

Copy link
Collaborator

@JakubFrejlach JakubFrejlach left a comment

Choose a reason for hiding this comment

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

Couple of questions and the -r render problem as per slack discussion

griffon/services/core_queries.py Show resolved Hide resolved
griffon/services/core_queries.py Outdated Show resolved Hide resolved
griffon/services/core_queries.py Outdated Show resolved Hide resolved
griffon/static/default_griffonrc Show resolved Hide resolved
@JimFuller-RedHat
Copy link
Collaborator Author

-r works for me ex. griffon service products-contain-component -r 'webkit(2|3)gtk' -vv

@JakubFrejlach
Copy link
Collaborator

-r works for me ex. griffon service products-contain-component -r 'webkit(2|3)gtk' -vv

I would like to also verify this again once Corgi stage/prod performance issues are resolved.

Copy link
Collaborator

@JakubFrejlach JakubFrejlach left a comment

Choose a reason for hiding this comment

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

LGTM! I would still like to verify the -r before the approval.

Copy link
Collaborator

@JakubFrejlach JakubFrejlach left a comment

Choose a reason for hiding this comment

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

LGTM!

@JimFuller-RedHat JimFuller-RedHat merged commit 326681f into main Jan 18, 2024
4 checks passed
@JimFuller-RedHat JimFuller-RedHat deleted the refactor-output branch January 19, 2024 19:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants