Skip to content

Commit

Permalink
remove v3 and v4 schema usage (#482)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Goodman <[email protected]>
  • Loading branch information
wagoodman authored Jan 24, 2025
1 parent dce5717 commit ded5a87
Show file tree
Hide file tree
Showing 78 changed files with 3 additions and 8,809 deletions.
4 changes: 2 additions & 2 deletions manager/src/grype_db_manager/data/schema-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
{
"schema": "3",
"grype-version": "v0.40.1",
"supported": true
"supported": false
},
{
"schema": "4",
"grype-version": "v0.50.2",
"supported": true
"supported": false
},
{
"schema": "5",
Expand Down
2 changes: 1 addition & 1 deletion manager/tests/unit/db/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ def test_grype_version():


def test_supported_schema_versions():
assert schema.supported_schema_versions() == [3, 4, 5, 6]
assert schema.supported_schema_versions() == [5, 6]
12 changes: 0 additions & 12 deletions pkg/process/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ import (

"github.com/anchore/grype-db/internal/log"
"github.com/anchore/grype-db/pkg/data"
v3 "github.com/anchore/grype-db/pkg/process/v3"
v4 "github.com/anchore/grype-db/pkg/process/v4"
v5 "github.com/anchore/grype-db/pkg/process/v5"
v6 "github.com/anchore/grype-db/pkg/process/v6"
"github.com/anchore/grype-db/pkg/provider"
"github.com/anchore/grype-db/pkg/provider/entry"
"github.com/anchore/grype-db/pkg/provider/unmarshal"
grypeDBv3 "github.com/anchore/grype/grype/db/v3"
grypeDBv4 "github.com/anchore/grype/grype/db/v4"
grypeDBv5 "github.com/anchore/grype/grype/db/v5"
grypeDBv6 "github.com/anchore/grype/grype/db/v6"
)
Expand Down Expand Up @@ -76,10 +72,6 @@ type providerResults struct {

func getProcessors(cfg BuildConfig) ([]data.Processor, error) {
switch cfg.SchemaVersion {
case grypeDBv3.SchemaVersion:
return v3.Processors(), nil
case grypeDBv4.SchemaVersion:
return v4.Processors(), nil
case grypeDBv5.SchemaVersion:
return v5.Processors(v5.NewConfig(v5.WithCPEParts(cfg.IncludeCPEParts), v5.WithInferNVDFixVersions(cfg.InferNVDFixVersions))), nil
case grypeDBv6.ModelVersion:
Expand All @@ -91,10 +83,6 @@ func getProcessors(cfg BuildConfig) ([]data.Processor, error) {

func getWriter(schemaVersion int, dataAge time.Time, directory string, states provider.States) (data.Writer, error) {
switch schemaVersion {
case grypeDBv3.SchemaVersion:
return v3.NewWriter(directory, dataAge)
case grypeDBv4.SchemaVersion:
return v4.NewWriter(directory, dataAge)
case grypeDBv5.SchemaVersion:
return v5.NewWriter(directory, dataAge, states)
case grypeDBv6.ModelVersion:
Expand Down
19 changes: 0 additions & 19 deletions pkg/process/v3/processors.go

This file was deleted.

22 changes: 0 additions & 22 deletions pkg/process/v3/transformers/entry.go

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit ded5a87

Please sign in to comment.