Skip to content

Commit

Permalink
Update runtime/reconcilers/source.go
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Egelund-Müller <[email protected]>
  • Loading branch information
k-anshul and begelundmuller authored Dec 18, 2023
1 parent 7e218fd commit 336c0aa
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions runtime/reconcilers/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,21 +385,13 @@ func (r *SourceReconciler) ingestSource(ctx context.Context, self *runtimev1.Res
}

func (r *SourceReconciler) driversSource(ctx context.Context, self *runtimev1.Resource, propsPB *structpb.Struct) (map[string]any, error) {
props := propsPB.AsMap()
spec := self.Resource.(*runtimev1.Resource_Source).Source.Spec
state := self.Resource.(*runtimev1.Resource_Source).Source.State

var err error
props, err = resolveTemplateProps(ctx, props, rillv1.TemplateResource{
tself := rillv1.TemplateResource{
Meta: self.Meta,
Spec: spec,
State: state,
}, r.C)
if err != nil {
return nil, err
Spec: self.GetSource().Spec,
State: self.GetSource().State,
}

return props, nil
return resolveTemplateProps(ctx, propsPB.AsMap(), tself, r.C)
}

func driversSink(conn drivers.Handle, tableName string) (map[string]any, error) {
Expand Down

0 comments on commit 336c0aa

Please sign in to comment.