mirror of https://github.com/databricks/cli.git
Compare commits
2 Commits
1ce20a2612
...
3f523b45cc
Author | SHA1 | Date |
---|---|---|
|
3f523b45cc | |
|
511db52bb7 |
|
@ -97,7 +97,7 @@ func (m *expandGlobs) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnost
|
||||||
return dyn.SetByPath(v, base, dyn.V(output))
|
return dyn.SetByPath(v, base, dyn.V(output))
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return diag.FromErr(err)
|
diags = diags.Extend(diag.FromErr(err))
|
||||||
}
|
}
|
||||||
|
|
||||||
return diags
|
return diags
|
||||||
|
|
|
@ -40,6 +40,7 @@ func (m *resolveResourceReferences) Apply(ctx context.Context, b *bundle.Bundle)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Note, diags are lost from all goroutines except the first one to return diag
|
||||||
return diag.FromErr(errs.Wait())
|
return diag.FromErr(errs.Wait())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,8 @@ func LoadFromBytes(path string, raw []byte) (*Root, diag.Diagnostics) {
|
||||||
// Convert normalized configuration tree to typed configuration.
|
// Convert normalized configuration tree to typed configuration.
|
||||||
err = r.updateWithDynamicValue(v)
|
err = r.updateWithDynamicValue(v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, diag.Errorf("failed to load %s: %v", path, err)
|
diags = diags.Extend(diag.Errorf("failed to load %s: %v", path, err))
|
||||||
|
return nil, diags
|
||||||
}
|
}
|
||||||
return &r, diags
|
return &r, diags
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,8 @@ func (f *folderPermissions) Apply(ctx context.Context, b bundle.ReadOnlyBundle)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := g.Wait(); err != nil {
|
if err := g.Wait(); err != nil {
|
||||||
return diag.FromErr(err)
|
// Note, only diag from first coroutine is captured, others are lost
|
||||||
|
diags = diags.Extend(diag.FromErr(err))
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, r := range results {
|
for _, r := range results {
|
||||||
|
|
|
@ -90,11 +90,6 @@ func (r *pipelineRunner) Run(ctx context.Context, opts *Options) (output.RunOutp
|
||||||
// Include resource key in logger.
|
// Include resource key in logger.
|
||||||
ctx = log.NewContext(ctx, log.GetLogger(ctx).With("resource", r.Key()))
|
ctx = log.NewContext(ctx, log.GetLogger(ctx).With("resource", r.Key()))
|
||||||
w := r.bundle.WorkspaceClient()
|
w := r.bundle.WorkspaceClient()
|
||||||
_, err := w.Pipelines.GetByPipelineId(ctx, pipelineID)
|
|
||||||
if err != nil {
|
|
||||||
log.Warnf(ctx, "Cannot get pipeline: %s", err)
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
req, err := opts.Pipeline.toPayload(r.pipeline, pipelineID)
|
req, err := opts.Pipeline.toPayload(r.pipeline, pipelineID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -90,8 +90,6 @@ func TestPipelineRunnerRestart(t *testing.T) {
|
||||||
PipelineId: "123",
|
PipelineId: "123",
|
||||||
}).Return(mockWait, nil)
|
}).Return(mockWait, nil)
|
||||||
|
|
||||||
pipelineApi.EXPECT().GetByPipelineId(mock.Anything, "123").Return(&pipelines.GetPipelineResponse{}, nil)
|
|
||||||
|
|
||||||
// Mock runner starting a new update
|
// Mock runner starting a new update
|
||||||
pipelineApi.EXPECT().StartUpdate(mock.Anything, pipelines.StartUpdate{
|
pipelineApi.EXPECT().StartUpdate(mock.Anything, pipelines.StartUpdate{
|
||||||
PipelineId: "123",
|
PipelineId: "123",
|
||||||
|
|
Loading…
Reference in New Issue