From 51597ecb326ff056031eb36ef2dd66a6b859386c Mon Sep 17 00:00:00 2001 From: Renan DelValle Date: Thu, 27 Dec 2018 10:09:22 -0800 Subject: [PATCH] Changing paths to refer to gorealis v2 in order for dependencies to be correct. --- clusters_test.go | 2 +- container.go | 2 +- examples/client.go | 4 ++-- examples/jsonClient.go | 4 ++-- examples/thermos_payload_minimal.json | 28 +++++++++++++++++++++++++++ go.mod | 6 +++--- go.sum | 7 +++++-- job.go | 2 +- jobUpdate.go | 2 +- monitors.go | 2 +- realis.go | 4 ++-- realis_e2e_test.go | 4 ++-- response/response.go | 2 +- retry.go | 4 ++-- task.go | 2 +- task_test.go | 4 ++-- util.go | 2 +- zk_test.go | 2 +- 18 files changed, 57 insertions(+), 26 deletions(-) create mode 100644 examples/thermos_payload_minimal.json diff --git a/clusters_test.go b/clusters_test.go index 0663cdc..48af5c9 100644 --- a/clusters_test.go +++ b/clusters_test.go @@ -18,7 +18,7 @@ import ( "fmt" "testing" - realis "github.com/paypal/gorealis" + realis "github.com/paypal/gorealis/v2" "github.com/stretchr/testify/assert" ) diff --git a/container.go b/container.go index a79aaf6..872dbac 100644 --- a/container.go +++ b/container.go @@ -15,7 +15,7 @@ package realis import ( - "github.com/paypal/gorealis/gen-go/apache/aurora" + "github.com/paypal/gorealis/v2/gen-go/apache/aurora" ) type Container interface { diff --git a/examples/client.go b/examples/client.go index d4ea8f0..59991f7 100644 --- a/examples/client.go +++ b/examples/client.go @@ -22,8 +22,8 @@ import ( "strings" "time" - realis "github.com/paypal/gorealis" - "github.com/paypal/gorealis/gen-go/apache/aurora" + realis "github.com/paypal/gorealis/v2" + "github.com/paypal/gorealis/v2/gen-go/apache/aurora" ) var cmd, executor, url, clustersConfig, clusterName, updateId, username, password, zkUrl, hostList, role string diff --git a/examples/jsonClient.go b/examples/jsonClient.go index 907b0d0..692a613 100644 --- a/examples/jsonClient.go +++ b/examples/jsonClient.go @@ -23,8 +23,8 @@ import ( "os" "time" - realis "github.com/paypal/gorealis" - "github.com/paypal/gorealis/gen-go/apache/aurora" + realis "github.com/paypal/gorealis/v2" + "github.com/paypal/gorealis/v2/gen-go/apache/aurora" "github.com/pkg/errors" ) diff --git a/examples/thermos_payload_minimal.json b/examples/thermos_payload_minimal.json new file mode 100644 index 0000000..ae7b0ab --- /dev/null +++ b/examples/thermos_payload_minimal.json @@ -0,0 +1,28 @@ +{ + "task": { + "processes": [ + { + "daemon": false, + "name": "hello", + "ephemeral": false, + "max_failures": 1, + "min_duration": 5, + "cmdline": "\n while true; do\n echo hello world from gorealis\n sleep 10\n done\n ", + "final": false + } + ], + "resources": { + "gpu": 0, + "disk": 134217728, + "ram": 134217728, + "cpu": 1.1 + }, + "constraints": [ + { + "order": [ + "hello" + ] + } + ] + } +} diff --git a/go.mod b/go.mod index c16fc63..1b3540c 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ module github.com/paypal/gorealis/v2 require ( - git.apache.org/thrift.git v0.0.0-20181016064013-5c1ecb67cde4 - github.com/davecgh/go-spew v1.1.0 + git.apache.org/thrift.git v0.12.0 + github.com/davecgh/go-spew v1.1.0 // indirect github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e - github.com/pmezard/go-difflib v1.0.0 + github.com/pmezard/go-difflib v1.0.0 // indirect github.com/samuel/go-zookeeper v0.0.0-20171117190445-471cd4e61d7a github.com/stretchr/testify v1.2.0 ) diff --git a/go.sum b/go.sum index 4a1be5a..755810b 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,12 @@ -git.apache.org/thrift.git v0.0.0-20181016064013-5c1ecb67cde4 h1:crM1vBe07qSmh3hRVFXp4/TCfWaQkayD6ZOlNbQYtvw= -git.apache.org/thrift.git v0.0.0-20181016064013-5c1ecb67cde4/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +git.apache.org/thrift.git v0.12.0 h1:692K1/SsOcQvkvMRMdt60FCq2AvKpuQNM6sIeH3mN4s= +git.apache.org/thrift.git v0.12.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e h1:+RHxT/gm0O3UF7nLJbdNzAmULvCFt4XfXHWzh3XI/zs= github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/samuel/go-zookeeper v0.0.0-20171117190445-471cd4e61d7a h1:EYL2xz/Zdo0hyqdZMXR4lmT2O11jDLTPCEqIe/FR6W4= github.com/samuel/go-zookeeper v0.0.0-20171117190445-471cd4e61d7a/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/stretchr/testify v1.2.0 h1:LThGCOvhuJic9Gyd1VBCkhyUXmO8vKaBFvBsJ2k03rg= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= diff --git a/job.go b/job.go index 4798f37..a9881b5 100644 --- a/job.go +++ b/job.go @@ -15,7 +15,7 @@ package realis import ( - "github.com/paypal/gorealis/gen-go/apache/aurora" + "github.com/paypal/gorealis/v2/gen-go/apache/aurora" ) // Structure to collect all information pertaining to an Aurora job. diff --git a/jobUpdate.go b/jobUpdate.go index bd25e79..bfc3820 100644 --- a/jobUpdate.go +++ b/jobUpdate.go @@ -18,7 +18,7 @@ import ( "time" "git.apache.org/thrift.git/lib/go/thrift" - "github.com/paypal/gorealis/gen-go/apache/aurora" + "github.com/paypal/gorealis/v2/gen-go/apache/aurora" ) // Structure to collect all information required to create job update diff --git a/monitors.go b/monitors.go index 0c024ad..d45963e 100644 --- a/monitors.go +++ b/monitors.go @@ -18,7 +18,7 @@ package realis import ( "time" - "github.com/paypal/gorealis/gen-go/apache/aurora" + "github.com/paypal/gorealis/v2/gen-go/apache/aurora" "github.com/pkg/errors" ) diff --git a/realis.go b/realis.go index 92ac5c1..8840402 100644 --- a/realis.go +++ b/realis.go @@ -32,8 +32,8 @@ import ( "time" "git.apache.org/thrift.git/lib/go/thrift" - "github.com/paypal/gorealis/gen-go/apache/aurora" - "github.com/paypal/gorealis/response" + "github.com/paypal/gorealis/v2/gen-go/apache/aurora" + "github.com/paypal/gorealis/v2/response" "github.com/pkg/errors" ) diff --git a/realis_e2e_test.go b/realis_e2e_test.go index 2cc79b8..3826fc8 100644 --- a/realis_e2e_test.go +++ b/realis_e2e_test.go @@ -22,8 +22,8 @@ import ( "testing" "time" - realis "github.com/paypal/gorealis" - "github.com/paypal/gorealis/gen-go/apache/aurora" + realis "github.com/paypal/gorealis/v2" + "github.com/paypal/gorealis/v2/gen-go/apache/aurora" "github.com/pkg/errors" "github.com/stretchr/testify/assert" ) diff --git a/response/response.go b/response/response.go index 2eb1d5e..2b2ffe0 100644 --- a/response/response.go +++ b/response/response.go @@ -18,7 +18,7 @@ package response import ( "bytes" - "github.com/paypal/gorealis/gen-go/apache/aurora" + "github.com/paypal/gorealis/v2/gen-go/apache/aurora" ) // Get key from a response created by a StartJobUpdate call diff --git a/retry.go b/retry.go index 59d0aa0..cb5b5a4 100644 --- a/retry.go +++ b/retry.go @@ -24,8 +24,8 @@ import ( "time" "git.apache.org/thrift.git/lib/go/thrift" - "github.com/paypal/gorealis/gen-go/apache/aurora" - "github.com/paypal/gorealis/response" + "github.com/paypal/gorealis/v2/gen-go/apache/aurora" + "github.com/paypal/gorealis/v2/response" "github.com/pkg/errors" ) diff --git a/task.go b/task.go index c097a11..f05cef6 100644 --- a/task.go +++ b/task.go @@ -18,7 +18,7 @@ import ( "strconv" "git.apache.org/thrift.git/lib/go/thrift" - "github.com/paypal/gorealis/gen-go/apache/aurora" + "github.com/paypal/gorealis/v2/gen-go/apache/aurora" ) type ResourceType int diff --git a/task_test.go b/task_test.go index a2efa39..4f5d67b 100644 --- a/task_test.go +++ b/task_test.go @@ -17,8 +17,8 @@ package realis_test import ( "testing" - realis "github.com/paypal/gorealis" - "github.com/paypal/gorealis/gen-go/apache/aurora" + realis "github.com/paypal/gorealis/v2" + "github.com/paypal/gorealis/v2/gen-go/apache/aurora" "github.com/stretchr/testify/assert" ) diff --git a/util.go b/util.go index 324b12f..caf7baa 100644 --- a/util.go +++ b/util.go @@ -4,7 +4,7 @@ import ( "net/url" "strings" - "github.com/paypal/gorealis/gen-go/apache/aurora" + "github.com/paypal/gorealis/v2/gen-go/apache/aurora" "github.com/pkg/errors" ) diff --git a/zk_test.go b/zk_test.go index c23ff75..c929e03 100644 --- a/zk_test.go +++ b/zk_test.go @@ -20,7 +20,7 @@ import ( "testing" "time" - realis "github.com/paypal/gorealis" + realis "github.com/paypal/gorealis/v2" "github.com/stretchr/testify/assert" )