From 59f67f9cb59f077336f668b46623e6901c1741b9 Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Tue, 2 Nov 2021 11:39:51 +0100 Subject: [PATCH 1/2] Fix export architecture configuration to resolves #1087 Signed-off-by: Tom Chauveau --- environment/pipeline.go | 4 ++-- solver/solver.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/environment/pipeline.go b/environment/pipeline.go index 85556c4b..df6dc677 100644 --- a/environment/pipeline.go +++ b/environment/pipeline.go @@ -854,7 +854,7 @@ func (p *Pipeline) PushContainer(ctx context.Context, op *compiler.Value, st llb "name": ref.String(), "push": "true", }, - }) + }, p.platform) if err != nil { return st, err @@ -913,7 +913,7 @@ func (p *Pipeline) SaveImage(ctx context.Context, op *compiler.Value, st llb.Sta Output: func(_ map[string]string) (io.WriteCloser, error) { return pipeW, nil }, - }) + }, p.platform) if err != nil { return st, err diff --git a/solver/solver.go b/solver/solver.go index a3f6d7b3..4362c41a 100644 --- a/solver/solver.go +++ b/solver/solver.go @@ -177,7 +177,7 @@ func (s Solver) forwardEvents(ch chan *bk.SolveStatus) { // FIXME: this is currently impleneted as a hack, starting a new Build session // within buildkit from the Control API. Ideally the Gateway API should allow to // Export directly. -func (s Solver) Export(ctx context.Context, st llb.State, img *dockerfile2llb.Image, output bk.ExportEntry) (*bk.SolveResponse, error) { +func (s Solver) Export(ctx context.Context, st llb.State, img *dockerfile2llb.Image, output bk.ExportEntry, platform specs.Platform) (*bk.SolveResponse, error) { // Check close event channel and return if we're already done with the main pipeline select { case <-s.closeCh: @@ -185,7 +185,7 @@ func (s Solver) Export(ctx context.Context, st llb.State, img *dockerfile2llb.Im default: } - def, err := s.Marshal(ctx, st) + def, err := s.Marshal(ctx, st, llb.Platform(platform)) if err != nil { return nil, err } From faf2b76bcb6788caeab57e575ec8992f19f7c125 Mon Sep 17 00:00:00 2001 From: Tom Chauveau Date: Tue, 2 Nov 2021 13:34:42 +0100 Subject: [PATCH 2/2] Fix argoCD timeout in universe test Signed-off-by: Tom Chauveau --- stdlib/universe.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/universe.bats b/stdlib/universe.bats index 011ec070..86dbeec2 100644 --- a/stdlib/universe.bats +++ b/stdlib/universe.bats @@ -252,7 +252,7 @@ setup() { dagger -e argocd-infra up # Wait for infra to be ready - kubectl -n argocd wait --for=condition=available deployment -l "app.kubernetes.io/part-of=argocd" --timeout=45s + kubectl -n argocd wait --for=condition=available deployment -l "app.kubernetes.io/part-of=argocd" --timeout=100s # Forward port # We need to kill subprocess to avoid infinity loop