Skip to content

Commit 07466ae

Browse files
authored
Fix missing Tasks List in db-cache, update wrapper-server and render logs (#313)
* Remove new line with empty 'stderr' * Remove empty line after render is completed * Fix empty tasks list in DB-cache
1 parent d60c1f3 commit 07466ae

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

func/wrapper-server/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ func (e *singleFunctionEvaluator) EvaluateFunction(ctx context.Context, req *pb.
133133
}
134134
}
135135

136-
klog.Infof("Evaluated %q: stdout length: %d\nstderr:\n%v", req.Image, len(outbytes), stderrStr)
136+
klog.Infof("Evaluated %q: stdout length in bytes: %d", req.Image, len(outbytes))
137+
137138
rl, pErr := fn.ParseResourceList(outbytes)
138139
if pErr != nil {
139140
klog.V(4).Infof("Input Resource List: %s\nOutput Resource List: %s", req.ResourceList, outbytes)

internal/kpt/util/render/executor.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,6 @@ func (pn *pkgNode) runPipeline(ctx context.Context, hctx *hydrationContext, inpu
527527
if err = pn.runValidators(ctx, hctx, mutatedResources); err != nil {
528528
return nil, errors.E(op, pn.pkg.UniquePath, err)
529529
}
530-
// print a new line after a pipeline running
531-
pr.Printf("\n")
532530
return mutatedResources, nil
533531
}
534532

pkg/engine/pushpr.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ func PushPackageRevision(ctx context.Context, repo repository.Repository, pr rep
5050
return v1.UpstreamLock{}, pkgerrors.Wrapf(err, "push of package revision %+v to repository %+v failed, could not create package revision draft:", pr.Key(), repo.Key())
5151
}
5252

53-
if err = draft.UpdateResources(ctx, resources, &v1alpha1.Task{Type: v1alpha1.TaskTypePush}); err != nil {
53+
commitTask := &v1alpha1.Task{Type: v1alpha1.TaskTypePush}
54+
if len(apiPr.Spec.Tasks) > 0 {
55+
commitTask = &apiPr.Spec.Tasks[0]
56+
}
57+
58+
if err = draft.UpdateResources(ctx, resources, commitTask); err != nil {
5459
return v1.UpstreamLock{}, pkgerrors.Wrapf(err, "push of package revision %+v to repository %+v failed, could not update package revision resources:", pr.Key(), repo.Key())
5560
}
5661

0 commit comments

Comments
 (0)