Skip to content

update istio classifier#4645

Open
witchcraze wants to merge 1 commit intoanchore:mainfrom
witchcraze:4546_update-istio-binary-classifier
Open

update istio classifier#4645
witchcraze wants to merge 1 commit intoanchore:mainfrom
witchcraze:4546_update-istio-binary-classifier

Conversation

@witchcraze
Copy link
Contributor

Description

update grafana classifier to support alpha, beta, rc, dev version.

$ go test -v ./syft/pkg/cataloger/binary -run Test_Cataloger_PositiveCases/istio
=== RUN   Test_Cataloger_PositiveCases
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.29.0-alpha.0/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-discovery/1.29.0-alpha.0/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.29.0-beta.0/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-discovery/1.29.0-beta.0/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.29.0-rc.3/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-discovery/1.29.0-rc.3/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.26.8/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-discovery/1.26.8/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.10-dev/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-discovery/1.10-dev/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.8.0/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-discovery/1.8.0/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.3.8/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-discovery/1.3.8/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.1.17/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-discovery/1.1.17/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.29.0-alpha.0/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-agent/1.29.0-alpha.0/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.29.0-beta.0/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-agent/1.29.0-beta.0/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.29.0-rc.3/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-agent/1.29.0-rc.3/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.26.8/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-agent/1.26.8/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.10-dev/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-agent/1.10-dev/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.8.0/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-agent/1.8.0/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.1.17/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-agent/1.1.17/linux-amd64"
--- PASS: Test_Cataloger_PositiveCases (3.17s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.29.0-alpha.0/linux-amd64 (0.48s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.29.0-beta.0/linux-amd64 (0.78s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.29.0-rc.3/linux-amd64 (0.52s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.26.8/linux-amd64 (0.10s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.10-dev/linux-amd64 (0.09s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.8.0/linux-amd64 (0.11s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.3.8/linux-amd64 (0.09s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.1.17/linux-amd64 (0.08s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.29.0-alpha.0/linux-amd64 (0.11s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.29.0-beta.0/linux-amd64 (0.18s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.29.0-rc.3/linux-amd64 (0.19s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.26.8/linux-amd64 (0.06s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.10-dev/linux-amd64 (0.24s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.8.0/linux-amd64 (0.08s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.1.17/linux-amd64 (0.06s)
PASS
ok      github.com/anchore/syft/syft/pkg/cataloger/binary       3.191s
$ go test -v ./syft/pkg/cataloger/binary -run Test_Cataloger_PositiveCases/istio -must-use-original-binaries
=== RUN   Test_Cataloger_PositiveCases
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.29.0-alpha.0/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-discovery/1.29.0-alpha.0/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.29.0-beta.0/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-discovery/1.29.0-beta.0/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.29.0-rc.3/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-discovery/1.29.0-rc.3/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.26.8/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-discovery/1.26.8/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.10-dev/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-discovery/1.10-dev/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.8.0/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-discovery/1.8.0/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.3.8/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-discovery/1.3.8/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.1.17/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-discovery/1.1.17/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.29.0-alpha.0/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-agent/1.29.0-alpha.0/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.29.0-beta.0/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-agent/1.29.0-beta.0/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.29.0-rc.3/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-agent/1.29.0-rc.3/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.26.8/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-agent/1.26.8/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.10-dev/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-agent/1.10-dev/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.8.0/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-agent/1.8.0/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.1.17/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-agent/1.1.17/linux-amd64"
--- PASS: Test_Cataloger_PositiveCases (34.86s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.29.0-alpha.0/linux-amd64 (3.06s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.29.0-beta.0/linux-amd64 (3.07s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.29.0-rc.3/linux-amd64 (3.06s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.26.8/linux-amd64 (2.74s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.10-dev/linux-amd64 (3.42s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.8.0/linux-amd64 (4.72s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.3.8/linux-amd64 (1.46s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.1.17/linux-amd64 (4.44s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.29.0-alpha.0/linux-amd64 (0.76s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.29.0-beta.0/linux-amd64 (0.77s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.29.0-rc.3/linux-amd64 (0.75s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.26.8/linux-amd64 (0.73s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.10-dev/linux-amd64 (1.56s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.8.0/linux-amd64 (2.61s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.1.17/linux-amd64 (1.72s)
PASS
ok      github.com/anchore/syft/syft/pkg/cataloger/binary       34.879s

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (please discuss with the team first; Syft is 1.0 software and we won't accept breaking changes without going to 2.0)
  • Documentation (updates the documentation)
  • Chore (improve the developer experience, fix a test flake, etc, without changing the visible behavior of Syft)
  • Performance (make Syft run faster or use less memory, without changing visible behavior much)

Checklist

  • I have added unit tests that cover changed behavior
  • I have tested my code in common scenarios and confirmed there are no regressions
  • I have added comments to my code, particularly in hard-to-understand sections

Issue references

Fixes #4546

Signed-off-by: witchcraze <witchcraze@gmail.com>
@witchcraze
Copy link
Contributor Author

To solve conflict (need to download binary and make snippet again), update capture-snippet.sh will be required in #4662

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.

Support istio binary (pilot-discovery, pilot-agent) alpha,beta,rc,dev version

1 participant