-
Notifications
You must be signed in to change notification settings - Fork 32
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
Only store attestation data that is needed #2207
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2207 +/- ##
==========================================
- Coverage 71.21% 71.19% -0.03%
==========================================
Files 88 88
Lines 7501 7520 +19
==========================================
+ Hits 5342 5354 +12
- Misses 2159 2166 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
6952ce0
to
8780fe0
Compare
The whole attestation is being stored for each component that is evaluated, but in most cases only a subset of the attestation printed. This change captures only the needed attestation data based on the output selected at runtime. https://issues.redhat.com/browse/EC-1026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems reasonable. Can you see a significant reduction in memory use for a large snapshot?
I'm concerned that this doesn't go far enough. It's still accumulating large amounts of data in memory which we know it's a problem. What about writing the data to files and just track the file paths in memory? Anyways, I think measuring the impact in memory utilization before and after this change should be done to help decide which path to take. UPDATE: The biggest saver here is the check to only store the statement if the "attestation" output target is requested. The data that actually always gets tracked seems significantly smaller. |
|
The memory reduction looks good. Do you have a bash snippet that you used to produce those? |
xtime ec validate image --images ../ec-cli/local_testing/large-snapshot.yaml --policy github.com/joejstuart/ec-config//slsa3?ref=volatile-test -k ../ec-cli/local_testing/cosign.pub --ignore-rekor --timeout 30m $ cat ~/bin/xtime
#!/bin/sh
/opt/homebrew/bin/gtime -f '%Uu %Ss %er %MkB %C' "$@" |
The whole attestation is being stored for each component that is evaluated, but in most cases only a subset of the attestation is printed. This change captures only the needed attestation data based on the output selected at runtime.
https://issues.redhat.com/browse/EC-1026