Skip to content

test: discount packages without source information in rpm-manifest #1540

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

crozzy
Copy link
Contributor

@crozzy crozzy commented May 12, 2025

/api/containers/v1/images/id/{img_id}/rpm-manifest now returns a lot of packages in the response for different architectures. These packages don't have any source information. This was causing test errors when trying to convert them into claircore.Packages. This patch ignores pacakges that don't contain full source information.

/api/containers/v1/images/id/{img_id}/rpm-manifest now returns a lot of
packages in the response for different architectures. These packages
don't have any source information. This was causing test errors when
trying to convert them into `claircore.Package`s. This patch ignores
pacakges that don't contain full source information.

Signed-off-by: crozzy <[email protected]>
@crozzy crozzy requested a review from a team as a code owner May 12, 2025 22:29
@crozzy crozzy requested review from hdonnay and removed request for a team May 12, 2025 22:29
@crozzy
Copy link
Contributor Author

crozzy commented May 12, 2025

https://github.com/quay/claircore/actions/runs/14983915737

@crozzy
Copy link
Contributor Author

crozzy commented May 14, 2025

Closes #1538

@hdonnay
Copy link
Member

hdonnay commented May 14, 2025

I tackled this by changing this cmp.Option to also ignore the .Source field.

@crozzy
Copy link
Contributor Author

crozzy commented May 22, 2025

I tackled this by changing this cmp.Option to also ignore the .Source field.

But won't the test fail before it even gets to comparing if the source info isn't in the response, e.g:

manifest.go:54: #007: (catalog.RpmsItems{Architecture:"aarch64", GPG:"199e2f91fd431d51", Name:"binutils", NVRA:"binutils-2.35.2-63.el9.aarch64", Release:"63.el9", SrpmName:"", SrpmNEVRA:"", Summary:"A GNU collection of binary utilities", Version:"2.35.2", Epoch:"", Module:"", RepositoryHint:""}) unable to determine source version: rpmver: : missing separators

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants