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

Reject/Filter out SBOM, Attestation and Sig Tags #224

Closed
wants to merge 4 commits into from

Conversation

davidcollom
Copy link
Collaborator

This will help reduce some of the API Calls performed when attestation, sbom and sig tags are published, we don't care/need them so should also reduce the memory footprint along the way.

@ribbybibby
Copy link
Member

It looks to me like there's only a few clients where this actually reduces the number of API calls we're making. For some we have to iterate through everything anyway.

Would it make sense to apply util.FilterSbomAttestationSigs higher up in pkg/client/client.go? Then we would only have to use it in the client implementations when it actually provides an optimisation.

@davidcollom
Copy link
Collaborator Author

So I agree that there's only a handful of clients that would affect API calls... But we also cache these image tag lists for additional containers that come along in the meantime time (i.e scaling up a replica). So if we have a considerable number of tags with attestations, Sig and sbom (looking at kyverno here too with their large numbers of tags) we should reduce that memory footprint too

@ribbybibby
Copy link
Member

I think we would be able to avoid caching the tags if we filtered them further up the stack. I'm thinking here: https://github.com/jetstack/version-checker/blob/main/pkg/client/client.go#L108.

It just saves pushing the requirement to filter things into the individual client implementations (unless there's a reason to). It would mean you don't need to remember to apply this filter when you write a new client.

@ribbybibby
Copy link
Member

I suppose more generally, it might be nice if we had a mechanism for passing the filters that version checker applies into the clients where it would save on API calls.

pkg/client/client.go Outdated Show resolved Hide resolved
@davidcollom davidcollom added the enhancement New feature or request label Aug 15, 2024
Copy link
Contributor

This Pull Request is stale because it has been open for 60 days with
no activity. It will be closed in 7 days if no further activity.

@github-actions github-actions bot added the stale label Nov 14, 2024
@github-actions github-actions bot closed this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants