Skip to content

Commit

Permalink
buildinfo: filter attrs while merging metadata in bridge result
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Feb 18, 2022
1 parent 828bcb7 commit cb6f74c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/buildinfo/buildinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,15 @@ func GetMetadata(metadata map[string][]byte, key string, reqFrontend string, req
if reqFrontend != "" {
mbi.Frontend = reqFrontend
}
mbi.Attrs = convertMap(reduceMap(reqAttrs, mbi.Attrs))
mbi.Attrs = filterAttrs(convertMap(reduceMap(reqAttrs, mbi.Attrs)))
dtbi, err = json.Marshal(mbi)
if err != nil {
return nil, errors.Wrapf(err, "failed to marshal build info for %q", key)
}
} else {
dtbi, err = json.Marshal(binfotypes.BuildInfo{
Frontend: reqFrontend,
Attrs: convertMap(reqAttrs),
Attrs: filterAttrs(convertMap(reqAttrs)),
})
if err != nil {
return nil, errors.Wrapf(err, "failed to marshal build info for %q", key)
Expand Down

0 comments on commit cb6f74c

Please sign in to comment.