Skip to content

Commit

Permalink
Do not add downstream links for sub-branch-nodes (flyteorg#285)
Browse files Browse the repository at this point in the history
Signed-off-by: Haytham Abuelfutuh <[email protected]>
  • Loading branch information
EngHabu authored Jul 2, 2021
1 parent ef2584c commit 3049039
Show file tree
Hide file tree
Showing 14 changed files with 3,869 additions and 30 deletions.
24 changes: 19 additions & 5 deletions pkg/compiler/test/compiler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"strings"
"testing"

"github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin"

"k8s.io/apimachinery/pkg/util/sets"

"github.com/go-test/deep"
Expand Down Expand Up @@ -304,7 +306,7 @@ func TestBranches(t *testing.T) {

t.Run(path, func(t *testing.T) {
// If you want to debug a single use-case. Uncomment this line.
//if !strings.HasSuffix(path, "success_8_nested.json") {
//if !strings.HasSuffix(path, "mycereal_condition_has_no_deps.json") {
// t.SkipNow()
//}

Expand All @@ -317,14 +319,26 @@ func TestBranches(t *testing.T) {
t.FailNow()
}
} else if filepath.Ext(path) == ".pb" {
m := &jsonpb.Marshaler{
Indent: " ",
}

err = proto.Unmarshal(raw, wf)
if !assert.NoError(t, err) {
t.FailNow()
}
tsk := &admin.TaskSpec{}
if !assert.NoError(t, proto.Unmarshal(raw, tsk)) {
t.FailNow()
}

m := &jsonpb.Marshaler{
Indent: " ",
raw, _ := m.MarshalToString(tsk)
err = ioutil.WriteFile(strings.TrimSuffix(path, filepath.Ext(path))+"_task.json", []byte(raw), os.ModePerm)
if !assert.NoError(t, err) {
t.FailNow()
}

return
}

raw, err := m.MarshalToString(wf)
if !assert.NoError(t, err) {
t.FailNow()
Expand Down
Loading

0 comments on commit 3049039

Please sign in to comment.