Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ require (
github.com/go-test/deep v1.0.1
github.com/labstack/echo/v4 v4.1.13
github.com/logrusorgru/aurora v2.0.3+incompatible
github.com/onsi/ginkgo v1.11.0 // indirect
github.com/onsi/gomega v1.8.1 // indirect
github.com/orcaman/concurrent-map v0.0.0-20190107190726-7ed82d9cb717
github.com/rs/xid v0.0.0-20170604230408-02dd45c33376
github.com/sirupsen/logrus v1.0.6
github.com/square/spincycle v1.0.12 // indirect
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect
gopkg.in/yaml.v2 v2.2.4
)
11 changes: 0 additions & 11 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumC
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA=
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg=
Expand Down Expand Up @@ -52,10 +50,7 @@ github.com/rs/xid v0.0.0-20170604230408-02dd45c33376 h1:pisBoZ1sLLFc+g7EZflpvatX
github.com/rs/xid v0.0.0-20170604230408-02dd45c33376/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
github.com/sirupsen/logrus v1.0.6 h1:hcP1GmhGigz/O7h1WVUM5KklBp1JoNS9FggWKdj/j3s=
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/square/spincycle v1.0.12 h1:7q+9zrD04Mdaq+5ckHD8oMGrlwNDDqNwkXwJbqIaKRc=
github.com/square/spincycle v1.0.12/go.mod h1:1si3IokDQZBHo1YRR5oMoQwDhZ6nu4N5cMk4wPUDYow=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
Expand All @@ -67,15 +62,12 @@ github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPU
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876 h1:sKJQZMuxjOAR/Uo2LBfU90onWEf1dF4C+0hPJCc9Mpc=
golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 h1:efeOvDhwQ29Dj3SdAV/MJf8oukgn+8D8WgaCaRMchF8=
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand All @@ -84,15 +76,12 @@ golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8 h1:JA8d3MPx/IToSyXZG/RhwYEtfrKO1Fxrqe8KrkiLXKM=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
10 changes: 5 additions & 5 deletions request-manager/graph/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ func (r *resolver) RequestArgs(jobArgs map[string]interface{}) ([]proto.RequestA
for i, arg := range seq.Args.Optional {
val, ok := jobArgs[*arg.Name]
if !ok {
val = *arg.Default
val = arg.Default
}
reqArgs = append(reqArgs, proto.RequestArg{
Pos: i,
Name: *arg.Name,
Type: proto.ARG_TYPE_OPTIONAL,
Default: *arg.Default,
Default: arg.Default,
Value: val,
Given: ok,
})
Expand All @@ -114,7 +114,7 @@ func (r *resolver) RequestArgs(jobArgs map[string]interface{}) ([]proto.RequestA
Pos: i,
Name: *arg.Name,
Type: proto.ARG_TYPE_STATIC,
Value: *arg.Default,
Value: arg.Default,
})
}

Expand Down Expand Up @@ -168,12 +168,12 @@ func (r *resolver) buildSequence(cfg buildSequenceConfig) (*Graph, error) {
}
for _, arg := range seq.Args.Optional {
if _, ok := jobArgs[*arg.Name]; !ok {
jobArgs[*arg.Name] = *arg.Default
jobArgs[*arg.Name] = arg.Default
}
}
for _, arg := range seq.Args.Static {
if _, ok := jobArgs[*arg.Name]; !ok {
jobArgs[*arg.Name] = *arg.Default
jobArgs[*arg.Name] = arg.Default
}
}

Expand Down
4 changes: 2 additions & 2 deletions request-manager/graph/resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ func createGraph0(t *testing.T, sequencesFile, requestName string, jobArgs map[s
}
for _, arg := range seqSpec.Args.Optional {
if _, ok := jobArgs[*arg.Name]; !ok {
jobArgs[*arg.Name] = *arg.Default
jobArgs[*arg.Name] = arg.Default
}
}
for _, arg := range seqSpec.Args.Static {
if _, ok := jobArgs[*arg.Name]; !ok {
jobArgs[*arg.Name] = *arg.Default
jobArgs[*arg.Name] = arg.Default
}
}

Expand Down
4 changes: 2 additions & 2 deletions request-manager/request/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ func TestCreate(t *testing.T) {
{
Name: "bar",
Type: proto.ARG_TYPE_OPTIONAL,
Default: "175",
Value: "175",
Default: 175,
Value: 175,
Given: false,
},
},
Expand Down
2 changes: 1 addition & 1 deletion request-manager/spec/sequence-check.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (check RequiredArgsHaveNoDefaultsSequenceCheck) CheckSequence(sequence Sequ
} else {
name = *arg.Name
}
values = append(values, fmt.Sprintf("%s (%s)", *arg.Default, name))
values = append(values, fmt.Sprintf("%s (%s)", arg.Default, name))
}
}

Expand Down
2 changes: 1 addition & 1 deletion request-manager/spec/sequence-check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestFailRequiredArgsHaveNoDefaultsSequenceCheck(t *testing.T) {
Name: seqA,
Args: SequenceArgs{
Required: []*Arg{
&Arg{Name: &testVal, Default: &testVal},
&Arg{Name: &testVal, Default: testVal},
},
},
}
Expand Down
6 changes: 3 additions & 3 deletions request-manager/spec/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ type SequenceArgs struct {

// A sequence's args.
type Arg struct {
Name *string `yaml:"name"`
Desc string `yaml:"desc"`
Default *string `yaml:"default"`
Name *string `yaml:"name"`
Desc string `yaml:"desc"`
Default interface{} `yaml:"default"`
}

// A single role-based ACL entry. Every auth.Caller (from the
Expand Down