From fe2051f7552657a8790a32f9af9cace7c3309410 Mon Sep 17 00:00:00 2001 From: mdrakos Date: Thu, 5 Sep 2024 16:07:16 -0700 Subject: [PATCH] Filter artifacts for reporting --- pkg/buildplan/artifact.go | 2 +- pkg/buildplan/hydrate.go | 2 -- pkg/buildplan/ingredient.go | 3 +++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/buildplan/artifact.go b/pkg/buildplan/artifact.go index 212f9da773..09ae722e3f 100644 --- a/pkg/buildplan/artifact.go +++ b/pkg/buildplan/artifact.go @@ -201,7 +201,7 @@ func (a *Artifact) dependencies(recursive bool, seen map[strfmt.UUID]struct{}, r for _, ac := range a.children { related := len(relations) == 0 for _, relation := range relations { - if ac.Relation == relation { + if ac.Relation == relation && raw.IsStateToolMimeType(ac.Artifact.MimeType) { related = true } } diff --git a/pkg/buildplan/hydrate.go b/pkg/buildplan/hydrate.go index 38f9ca4bed..e103f0ff56 100644 --- a/pkg/buildplan/hydrate.go +++ b/pkg/buildplan/hydrate.go @@ -195,8 +195,6 @@ func (b *BuildPlan) hydrateWithIngredients(artifact *Artifact, platformID *strfm default: return errs.New("unexpected node type '%T': %#v", v, v) } - - return nil }) if err != nil { return errs.Wrap(err, "error hydrating ingredients") diff --git a/pkg/buildplan/ingredient.go b/pkg/buildplan/ingredient.go index 708820dff9..491a68b57f 100644 --- a/pkg/buildplan/ingredient.go +++ b/pkg/buildplan/ingredient.go @@ -97,6 +97,9 @@ func (i *Ingredient) runtimeDependencies(recursive bool, seen map[strfmt.UUID]st dependencies := Ingredients{} for _, a := range i.Artifacts { + if !raw.IsStateToolMimeType(a.MimeType) { + continue + } for _, ac := range a.children { if ac.Relation != RuntimeRelation { continue