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

APK Metadata decoding should be backwards compatible #1341

Merged
merged 1 commit into from
Nov 15, 2022
Merged

Conversation

wagoodman
Copy link
Contributor

A breaking changes of the data shape for the APK metadata was introduced with #1063, however, we should always have unmarshallers that support all previous versions of data structures. This PR adds custom unmarshallers for APKMetadata to do just that (remain backwards compatible).

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
@wagoodman wagoodman requested a review from a team November 15, 2022 16:15
@wagoodman wagoodman self-assigned this Nov 15, 2022
@wagoodman wagoodman added the bug Something isn't working label Nov 15, 2022
@wagoodman wagoodman enabled auto-merge (squash) November 15, 2022 16:15
@github-actions
Copy link

Benchmark Test Results

Benchmark results from the latest changes vs base branch
name                                                       old time/op    new time/op    delta
ImagePackageCatalogers/alpmdb-cataloger-2                    11.8ms ± 1%    15.6ms ± 2%  +32.34%  (p=0.008 n=5+5)
ImagePackageCatalogers/ruby-gemspec-cataloger-2              1.31ms ± 1%    1.87ms ±14%  +42.58%  (p=0.016 n=4+5)
ImagePackageCatalogers/python-package-cataloger-2            3.32ms ± 1%    4.47ms ± 4%  +34.69%  (p=0.008 n=5+5)
ImagePackageCatalogers/php-composer-installed-cataloger-2    1.08ms ± 1%    1.50ms ± 2%  +39.12%  (p=0.008 n=5+5)
ImagePackageCatalogers/javascript-package-cataloger-2         751µs ± 1%    1014µs ± 2%  +35.09%  (p=0.008 n=5+5)
ImagePackageCatalogers/node-binary-cataloger-2               6.78µs ± 1%    8.75µs ± 2%  +29.02%  (p=0.008 n=5+5)
ImagePackageCatalogers/dpkgdb-cataloger-2                     859µs ± 1%    1187µs ± 1%  +38.18%  (p=0.008 n=5+5)
ImagePackageCatalogers/rpm-db-cataloger-2                    1.27ms ± 0%    1.72ms ± 2%  +34.81%  (p=0.008 n=5+5)
ImagePackageCatalogers/java-cataloger-2                      14.3ms ± 1%    18.9ms ± 3%  +32.64%  (p=0.008 n=5+5)
ImagePackageCatalogers/apkdb-cataloger-2                     1.32ms ± 2%    1.73ms ± 3%  +31.32%  (p=0.008 n=5+5)
ImagePackageCatalogers/go-module-binary-cataloger-2          6.78µs ± 2%    8.51µs ± 2%  +25.53%  (p=0.008 n=5+5)
ImagePackageCatalogers/dotnet-deps-cataloger-2               1.37ms ± 1%    1.85ms ± 3%  +35.25%  (p=0.008 n=5+5)
ImagePackageCatalogers/portage-cataloger-2                    722µs ± 1%     980µs ± 4%  +35.88%  (p=0.008 n=5+5)

name                                                       old alloc/op   new alloc/op   delta
ImagePackageCatalogers/alpmdb-cataloger-2                    5.26MB ± 0%    5.26MB ± 0%     ~     (p=0.690 n=5+5)
ImagePackageCatalogers/ruby-gemspec-cataloger-2               205kB ± 0%     205kB ± 0%     ~     (p=0.222 n=5+5)
ImagePackageCatalogers/python-package-cataloger-2             961kB ± 0%     961kB ± 0%   -0.07%  (p=0.032 n=5+5)
ImagePackageCatalogers/php-composer-installed-cataloger-2     217kB ± 0%     217kB ± 0%     ~     (p=0.222 n=5+5)
ImagePackageCatalogers/javascript-package-cataloger-2         159kB ± 0%     159kB ± 0%     ~     (p=0.421 n=5+5)
ImagePackageCatalogers/node-binary-cataloger-2               1.12kB ± 0%    1.12kB ± 0%     ~     (all equal)
ImagePackageCatalogers/dpkgdb-cataloger-2                     199kB ± 0%     199kB ± 0%     ~     (p=0.056 n=5+5)
ImagePackageCatalogers/rpm-db-cataloger-2                     303kB ± 0%     302kB ± 0%   -0.18%  (p=0.008 n=5+5)
ImagePackageCatalogers/java-cataloger-2                      3.49MB ± 0%    3.49MB ± 0%     ~     (p=0.841 n=5+5)
ImagePackageCatalogers/apkdb-cataloger-2                     1.26MB ± 0%    1.26MB ± 0%   +0.06%  (p=0.016 n=5+5)
ImagePackageCatalogers/go-module-binary-cataloger-2          1.12kB ± 0%    1.12kB ± 0%     ~     (all equal)
ImagePackageCatalogers/dotnet-deps-cataloger-2                374kB ± 0%     375kB ± 0%   +0.10%  (p=0.008 n=5+5)
ImagePackageCatalogers/portage-cataloger-2                    138kB ± 0%     138kB ± 0%   -0.13%  (p=0.016 n=5+5)

name                                                       old allocs/op  new allocs/op  delta
ImagePackageCatalogers/alpmdb-cataloger-2                     85.7k ± 0%     85.7k ± 0%     ~     (p=1.000 n=5+5)
ImagePackageCatalogers/ruby-gemspec-cataloger-2               4.24k ± 0%     4.24k ± 0%     ~     (p=0.167 n=5+5)
ImagePackageCatalogers/python-package-cataloger-2             16.5k ± 0%     16.5k ± 0%     ~     (p=0.437 n=5+5)
ImagePackageCatalogers/php-composer-installed-cataloger-2     5.50k ± 0%     5.50k ± 0%     ~     (p=0.079 n=5+5)
ImagePackageCatalogers/javascript-package-cataloger-2         3.33k ± 0%     3.33k ± 0%     ~     (all equal)
ImagePackageCatalogers/node-binary-cataloger-2                 38.0 ± 0%      38.0 ± 0%     ~     (all equal)
ImagePackageCatalogers/dpkgdb-cataloger-2                     4.46k ± 0%     4.46k ± 0%     ~     (all equal)
ImagePackageCatalogers/rpm-db-cataloger-2                     8.11k ± 0%     8.11k ± 0%     ~     (all equal)
ImagePackageCatalogers/java-cataloger-2                       57.5k ± 0%     57.5k ± 0%     ~     (p=1.000 n=5+5)
ImagePackageCatalogers/apkdb-cataloger-2                      5.45k ± 0%     5.45k ± 0%     ~     (p=0.683 n=5+5)
ImagePackageCatalogers/go-module-binary-cataloger-2            38.0 ± 0%      38.0 ± 0%     ~     (all equal)
ImagePackageCatalogers/dotnet-deps-cataloger-2                7.12k ± 0%     7.12k ± 0%     ~     (all equal)
ImagePackageCatalogers/portage-cataloger-2                    3.58k ± 0%     3.58k ± 0%     ~     (all equal)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants