Revert "removed template manifest formatting based on potential need for metadata provided by user."

This reverts commit d4c919c9be.
This commit is contained in:
Andrey Melnikov
2020-04-10 13:34:26 -07:00
parent bfb65dd1ad
commit 19195fa23b
3 changed files with 58 additions and 7 deletions

View File

@@ -5,6 +5,7 @@ import (
"errors"
"github.com/onepanelio/core/pkg/util"
"google.golang.org/grpc/codes"
"log"
"math"
"sort"
"strings"
@@ -59,12 +60,17 @@ func apiWorkflowExecution(wf *v1.WorkflowExecution) (workflow *api.WorkflowExecu
}
func apiWorkflowTemplate(wft *v1.WorkflowTemplate) *api.WorkflowTemplate {
manifest, err := v1.RemoveAllButSpec(wft.GetManifestBytes())
if err != nil {
log.Printf("Error - TODO @todo")
}
return &api.WorkflowTemplate{
Uid: wft.UID,
CreatedAt: wft.CreatedAt.UTC().Format(time.RFC3339),
Name: wft.Name,
Version: wft.Version,
Manifest: wft.Manifest,
Manifest: string(manifest),
IsLatest: wft.IsLatest,
IsArchived: wft.IsArchived,
}