Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@spiffcs
Copy link
Contributor

@spiffcs spiffcs commented Nov 18, 2021

Promote Tasks into the Packages Command

This PR promotes the Task Pattern currently used by the power user command into the packages command.

The power user command has been deleted now that the package command is on par with the configuration complexity.

We should use this thread to discuss:

  • default tasks
  • syft configuration updates
  • flag updates

I think the eventual goal of the API change is to get to a point where generate can

syft generate 
      --packages \
      --file-classification \
      --file-contents \
      --file-metadata \
      --secrets \
      --output json

Currently packages will only run the `catalog packages task by default.

All other catalogers need to be explicitly configured in the configuration file. I'm definitely open to adding flag configuration in this PR but wanted everyone's thoughts.

I can also remove the power user integration tests if we find that removing the command at this time is correct.

Signed-off-by: Christopher Angelo Phillips [email protected]

@spiffcs spiffcs linked an issue Nov 18, 2021 that may be closed by this pull request
@spiffcs spiffcs marked this pull request as ready for review November 18, 2021 15:13
Signed-off-by: Christopher Angelo Phillips <[email protected]>
Signed-off-by: Christopher Angelo Phillips <[email protected]>
@spiffcs spiffcs force-pushed the 554-promote-catalog-task branch from b8f2334 to d50f883 Compare November 18, 2021 15:23
@github-actions
Copy link

github-actions bot commented Nov 18, 2021

Benchmark Test Results

Benchmark results from the latest changes vs base branch
name                                                   old time/op    new time/op    delta
ImagePackageCatalogers/ruby-gemspec-cataloger-2          1.49ms ± 0%    1.66ms ± 2%  +11.49%  (p=0.016 n=4+5)
ImagePackageCatalogers/python-package-cataloger-2        3.69ms ± 1%    4.15ms ± 6%  +12.51%  (p=0.008 n=5+5)
ImagePackageCatalogers/javascript-package-cataloger-2     853µs ± 2%     932µs ± 3%   +9.25%  (p=0.008 n=5+5)
ImagePackageCatalogers/dpkgdb-cataloger-2                1.02ms ± 2%    1.13ms ± 4%  +10.33%  (p=0.008 n=5+5)
ImagePackageCatalogers/rpmdb-cataloger-2                  890µs ± 1%     932µs ± 2%   +4.79%  (p=0.008 n=5+5)
ImagePackageCatalogers/java-cataloger-2                  12.5ms ± 4%    12.8ms ± 2%     ~     (p=0.095 n=5+5)
ImagePackageCatalogers/apkdb-cataloger-2                 1.44ms ± 2%    1.54ms ± 1%   +7.19%  (p=0.008 n=5+5)
ImagePackageCatalogers/go-module-binary-cataloger-2      1.57µs ± 2%    1.66µs ± 2%   +5.67%  (p=0.008 n=5+5)

name                                                   old alloc/op   new alloc/op   delta
ImagePackageCatalogers/ruby-gemspec-cataloger-2           285kB ± 0%     285kB ± 0%     ~     (p=0.690 n=5+5)
ImagePackageCatalogers/python-package-cataloger-2        1.29MB ± 0%    1.29MB ± 0%     ~     (p=0.421 n=5+5)
ImagePackageCatalogers/javascript-package-cataloger-2     211kB ± 0%     211kB ± 0%   -0.12%  (p=0.016 n=5+5)
ImagePackageCatalogers/dpkgdb-cataloger-2                 269kB ± 0%     269kB ± 0%   -0.08%  (p=0.032 n=5+5)
ImagePackageCatalogers/rpmdb-cataloger-2                  234kB ± 0%     234kB ± 0%   +0.00%  (p=0.008 n=5+5)
ImagePackageCatalogers/java-cataloger-2                  3.36MB ± 0%    3.36MB ± 0%     ~     (p=0.151 n=5+5)
ImagePackageCatalogers/apkdb-cataloger-2                 1.35MB ± 0%    1.35MB ± 0%     ~     (p=0.841 n=5+5)
ImagePackageCatalogers/go-module-binary-cataloger-2        480B ± 0%      480B ± 0%     ~     (all equal)

name                                                   old allocs/op  new allocs/op  delta
ImagePackageCatalogers/ruby-gemspec-cataloger-2           8.93k ± 0%     8.93k ± 0%     ~     (all equal)
ImagePackageCatalogers/python-package-cataloger-2         38.5k ± 0%     38.5k ± 0%     ~     (p=0.794 n=5+5)
ImagePackageCatalogers/javascript-package-cataloger-2     5.82k ± 0%     5.82k ± 0%     ~     (all equal)
ImagePackageCatalogers/dpkgdb-cataloger-2                 8.55k ± 0%     8.55k ± 0%     ~     (all equal)
ImagePackageCatalogers/rpmdb-cataloger-2                  7.10k ± 0%     7.10k ± 0%     ~     (all equal)
ImagePackageCatalogers/java-cataloger-2                   66.9k ± 0%     66.9k ± 0%     ~     (p=0.333 n=5+5)
ImagePackageCatalogers/apkdb-cataloger-2                  11.1k ± 0%     11.1k ± 0%     ~     (p=1.000 n=5+5)
ImagePackageCatalogers/go-module-binary-cataloger-2        11.0 ± 0%      11.0 ± 0%     ~     (all equal)

@spiffcs spiffcs requested a review from a team November 18, 2021 15:27
@spiffcs spiffcs added the enhancement New feature or request label Nov 18, 2021
Signed-off-by: Christopher Angelo Phillips <[email protected]>
Signed-off-by: Christopher Angelo Phillips <[email protected]>
Signed-off-by: Christopher Angelo Phillips <[email protected]>
Signed-off-by: Christopher Angelo Phillips <[email protected]>
Signed-off-by: Christopher Angelo Phillips <[email protected]>
* main:
  Introduce minimal source coordinates (#623)
Signed-off-by: Christopher Angelo Phillips <[email protected]>
Signed-off-by: Christopher Angelo Phillips <[email protected]>
@spiffcs spiffcs requested a review from wagoodman November 19, 2021 15:45
@spiffcs
Copy link
Contributor Author

spiffcs commented Nov 19, 2021

@wagoodman good to go for final review

@spiffcs spiffcs requested a review from luhring November 19, 2021 17:22
@spiffcs spiffcs merged commit 4f00995 into main Nov 19, 2021
@spiffcs spiffcs deleted the 554-promote-catalog-task branch November 19, 2021 18:26
spiffcs added a commit that referenced this pull request Nov 19, 2021
* main:
  promote catalog task pattern to all commands (#636)

Signed-off-by: Christopher Angelo Phillips <[email protected]>
@wagoodman wagoodman removed the enhancement New feature or request label Nov 21, 2021
fengshunli pushed a commit to fengshunli/syft that referenced this pull request Jan 24, 2022
Signed-off-by: Christopher Angelo Phillips <[email protected]>
Signed-off-by: fsl <[email protected]>
GijsCalis pushed a commit to GijsCalis/syft that referenced this pull request Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Promote cataloging task pattern

3 participants