Skip to content

Commit

Permalink
Call configure in sequence (not in parallel)
Browse files Browse the repository at this point in the history
  • Loading branch information
iwahbe committed Dec 12, 2024
1 parent e53958b commit 9955bde
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/x/muxer/muxer.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,13 @@ func (m *muxer) DiffConfig(ctx context.Context, req *pulumirpc.DiffRequest) (*pu
func (m *muxer) Configure(ctx context.Context, req *pulumirpc.ConfigureRequest) (*pulumirpc.ConfigureResponse, error) {
// Configure determines what the values the provider understands. We take the
// `and` of configure values.
subs := make([]func() tuple[*pulumirpc.ConfigureResponse, error], len(m.servers))
results := make([]tuple[*pulumirpc.ConfigureResponse, error], len(m.servers))
for i, s := range m.servers {
i, s := i, s
subs[i] = func() tuple[*pulumirpc.ConfigureResponse, error] {
results[i] = func() tuple[*pulumirpc.ConfigureResponse, error] {
req := proto.Clone(req).(*pulumirpc.ConfigureRequest)
return newTuple(s.Configure(ctx, req))
}
}()
}
response := &pulumirpc.ConfigureResponse{
AcceptSecrets: true,
Expand All @@ -306,7 +306,7 @@ func (m *muxer) Configure(ctx context.Context, req *pulumirpc.ConfigureRequest)
AcceptOutputs: true,
}
errs := new(multierror.Error)
for _, r := range asyncJoin(subs) {
for _, r := range results {
if r.B != nil {
errs.Errors = append(errs.Errors, r.B)
continue
Expand Down

0 comments on commit 9955bde

Please sign in to comment.