mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-03 09:57:41 +08:00
build: don't generate local state for subrequests
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
parent
746eadd16e
commit
886ae21e93
@ -11,7 +11,7 @@ import (
|
|||||||
|
|
||||||
func saveLocalState(so *client.SolveOpt, target string, opts Options, node builder.Node, cfg *confutil.Config) error {
|
func saveLocalState(so *client.SolveOpt, target string, opts Options, node builder.Node, cfg *confutil.Config) error {
|
||||||
var err error
|
var err error
|
||||||
if so.Ref == "" {
|
if so.Ref == "" || opts.CallFunc != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
lp := opts.Inputs.ContextPath
|
lp := opts.Inputs.ContextPath
|
||||||
|
@ -464,12 +464,18 @@ func saveLocalStateGroup(dockerCli command.Cli, in bakeOptions, targets []string
|
|||||||
groupRef := identity.NewID()
|
groupRef := identity.NewID()
|
||||||
refs := make([]string, 0, len(bo))
|
refs := make([]string, 0, len(bo))
|
||||||
for k, b := range bo {
|
for k, b := range bo {
|
||||||
|
if b.CallFunc != nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
b.Ref = identity.NewID()
|
b.Ref = identity.NewID()
|
||||||
b.GroupRef = groupRef
|
b.GroupRef = groupRef
|
||||||
b.ProvenanceResponseMode = prm
|
b.ProvenanceResponseMode = prm
|
||||||
refs = append(refs, b.Ref)
|
refs = append(refs, b.Ref)
|
||||||
bo[k] = b
|
bo[k] = b
|
||||||
}
|
}
|
||||||
|
if len(refs) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
l, err := localstate.New(confutil.NewConfig(dockerCli))
|
l, err := localstate.New(confutil.NewConfig(dockerCli))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user