diff --git a/build.py b/build.py index fb1bd2646..ca10afa0a 100755 --- a/build.py +++ b/build.py @@ -119,21 +119,16 @@ def package_scripts(build_root): def run_generate(): print "Running generate..." run("go get github.com/gogo/protobuf/protoc-gen-gogo") - command = "go generate ./..." - code = os.system(command) - if code != 0: - print "Generate Failed" - return False - else: - print "Generate Succeeded" + run("go generate ./...") + print "Generate succeeded." return True def go_get(branch, update=False, no_stash=False): get_command = "" if update: - get_command += "go get -u -f -d ./..." + get_command += "go get -t -u -f -d ./..." else: - get_command += "go get -d ./..." + get_command += "go get -t -d ./..." # 'go get' switches to master, so stash what we currently have changes = run("git status --porcelain").strip() @@ -180,6 +175,8 @@ def run(command, allow_failure=False, shell=False): out = subprocess.check_output(command, stderr=subprocess.STDOUT, shell=shell) else: out = subprocess.check_output(command.split(), stderr=subprocess.STDOUT) + if debug: + print "[DEBUG] command output: \n{}\n".format(out) except subprocess.CalledProcessError as e: print "" print "" @@ -346,14 +343,9 @@ def upload_packages(packages, bucket_name=None, nightly=False): return 0 def run_tests(race, parallel, timeout, no_vet): - print "Retrieving Go dependencies...", - get_command = "go get -d -t ./..." - sys.stdout.flush() - run(get_command) - get_command = "go get golang.org/x/tools/cmd/vet" + print "Downloading vet tool..." sys.stdout.flush() - run(get_command) - print "done." + run("go get golang.org/x/tools/cmd/vet") print "Running tests:" print "\tRace: ", race if parallel is not None: @@ -450,7 +442,7 @@ def build(version=None, elif arch == "armhf" or arch == "arm": build_command += "GOARM=6 " elif arch == "arm64": - build_command += "GOARM=arm64 " + build_command += "GOARM=7 " else: print "!! Invalid ARM architecture specifed: {}".format(arch) print "Please specify either 'armel', 'armhf', or 'arm64'" @@ -797,7 +789,8 @@ def main(): return 1 if run_get: - go_get(branch, update=update, no_stash=no_stash) + if not go_get(branch, update=update, no_stash=no_stash): + return 1 if test: if not run_tests(race, parallel, timeout, no_vet): diff --git a/circle.yml b/circle.yml index f435c5deb..ea5425122 100644 --- a/circle.yml +++ b/circle.yml @@ -20,4 +20,4 @@ deployment: release: tag: /v[0-9]+(\.[0-9]+){2}(-rc[0-9]+)?/ commands: - - ./build.sh --clean --generate --package --upload --platform=all --arch=all + - ./build.sh --debug --clean --generate --package --upload --platform=all --arch=all diff --git a/test.sh b/test.sh index 850bba0fb..a4defdae0 100755 --- a/test.sh +++ b/test.sh @@ -129,24 +129,24 @@ fi case $ENVIRONMENT_INDEX in 0) # 64 bit tests - run_test_docker Dockerfile_build_ubuntu64 test_64bit --test --generate --no-stash + run_test_docker Dockerfile_build_ubuntu64 test_64bit --debug --test --generate --no-stash rc=$? ;; 1) # 64 bit race tests GORACE="halt_on_error=1" - run_test_docker Dockerfile_build_ubuntu64 test_64bit_race --test --generate --no-stash --race + run_test_docker Dockerfile_build_ubuntu64 test_64bit_race --debug --test --generate --no-stash --race rc=$? ;; 2) # 32 bit tests - run_test_docker Dockerfile_build_ubuntu32 test_32bit --test --generate --no-stash + run_test_docker Dockerfile_build_ubuntu32 test_32bit --debug --test --generate --no-stash rc=$? ;; 3) # 64 bit tests on golang go1.6 GO_CHECKOUT=go1.6rc2 - run_test_docker Dockerfile_build_ubuntu64_git test_64bit_go1.6 --test --generate --no-stash + run_test_docker Dockerfile_build_ubuntu64_git test_64bit_go1.6 --debug --test --generate --no-stash rc=$? ;; "save") diff --git a/vendor/github.com/influxdb/influxdb/cluster/internal/data.pb.go b/vendor/github.com/influxdb/influxdb/cluster/internal/data.pb.go index f95463903..c7bbe0678 100644 --- a/vendor/github.com/influxdb/influxdb/cluster/internal/data.pb.go +++ b/vendor/github.com/influxdb/influxdb/cluster/internal/data.pb.go @@ -152,3 +152,10 @@ func (m *MapShardResponse) GetFields() []string { } return nil } + +func init() { + proto.RegisterType((*WriteShardRequest)(nil), "internal.WriteShardRequest") + proto.RegisterType((*WriteShardResponse)(nil), "internal.WriteShardResponse") + proto.RegisterType((*MapShardRequest)(nil), "internal.MapShardRequest") + proto.RegisterType((*MapShardResponse)(nil), "internal.MapShardResponse") +} diff --git a/vendor/github.com/influxdb/influxdb/services/copier/internal/internal.pb.go b/vendor/github.com/influxdb/influxdb/services/copier/internal/internal.pb.go index 68caa62fb..3151c52f3 100644 --- a/vendor/github.com/influxdb/influxdb/services/copier/internal/internal.pb.go +++ b/vendor/github.com/influxdb/influxdb/services/copier/internal/internal.pb.go @@ -54,3 +54,8 @@ func (m *Response) GetError() string { } return "" } + +func init() { + proto.RegisterType((*Request)(nil), "internal.Request") + proto.RegisterType((*Response)(nil), "internal.Response") +} diff --git a/vendor/github.com/influxdb/influxdb/services/meta/internal/meta.pb.go b/vendor/github.com/influxdb/influxdb/services/meta/internal/meta.pb.go index 3a7efdbc5..9565bb639 100644 --- a/vendor/github.com/influxdb/influxdb/services/meta/internal/meta.pb.go +++ b/vendor/github.com/influxdb/influxdb/services/meta/internal/meta.pb.go @@ -174,18 +174,19 @@ func (x *Command_Type) UnmarshalJSON(data []byte) error { } type Data struct { - Term *uint64 `protobuf:"varint,1,req,name=Term" json:"Term,omitempty"` - Index *uint64 `protobuf:"varint,2,req,name=Index" json:"Index,omitempty"` - ClusterID *uint64 `protobuf:"varint,3,req,name=ClusterID" json:"ClusterID,omitempty"` - Nodes []*NodeInfo `protobuf:"bytes,4,rep,name=Nodes" json:"Nodes,omitempty"` - Databases []*DatabaseInfo `protobuf:"bytes,5,rep,name=Databases" json:"Databases,omitempty"` - Users []*UserInfo `protobuf:"bytes,6,rep,name=Users" json:"Users,omitempty"` - MaxNodeID *uint64 `protobuf:"varint,7,req,name=MaxNodeID" json:"MaxNodeID,omitempty"` - MaxShardGroupID *uint64 `protobuf:"varint,8,req,name=MaxShardGroupID" json:"MaxShardGroupID,omitempty"` - MaxShardID *uint64 `protobuf:"varint,9,req,name=MaxShardID" json:"MaxShardID,omitempty"` - DataNodes []*NodeInfo `protobuf:"bytes,10,rep,name=DataNodes" json:"DataNodes,omitempty"` - MetaNodes []*NodeInfo `protobuf:"bytes,11,rep,name=MetaNodes" json:"MetaNodes,omitempty"` - XXX_unrecognized []byte `json:"-"` + Term *uint64 `protobuf:"varint,1,req,name=Term" json:"Term,omitempty"` + Index *uint64 `protobuf:"varint,2,req,name=Index" json:"Index,omitempty"` + ClusterID *uint64 `protobuf:"varint,3,req,name=ClusterID" json:"ClusterID,omitempty"` + Nodes []*NodeInfo `protobuf:"bytes,4,rep,name=Nodes" json:"Nodes,omitempty"` + Databases []*DatabaseInfo `protobuf:"bytes,5,rep,name=Databases" json:"Databases,omitempty"` + Users []*UserInfo `protobuf:"bytes,6,rep,name=Users" json:"Users,omitempty"` + MaxNodeID *uint64 `protobuf:"varint,7,req,name=MaxNodeID" json:"MaxNodeID,omitempty"` + MaxShardGroupID *uint64 `protobuf:"varint,8,req,name=MaxShardGroupID" json:"MaxShardGroupID,omitempty"` + MaxShardID *uint64 `protobuf:"varint,9,req,name=MaxShardID" json:"MaxShardID,omitempty"` + // added for 0.10.0 + DataNodes []*NodeInfo `protobuf:"bytes,10,rep,name=DataNodes" json:"DataNodes,omitempty"` + MetaNodes []*NodeInfo `protobuf:"bytes,11,rep,name=MetaNodes" json:"MetaNodes,omitempty"` + XXX_unrecognized []byte `json:"-"` } func (m *Data) Reset() { *m = Data{} } @@ -644,6 +645,8 @@ func (m *Command) GetType() Command_Type { return Command_CreateNodeCommand } +// This isn't used in >= 0.10.0. Kept around for upgrade purposes. Instead +// look at CreateDataNodeCommand and CreateMetaNodeCommand type CreateNodeCommand struct { Host *string `protobuf:"bytes,1,req,name=Host" json:"Host,omitempty"` Rand *uint64 `protobuf:"varint,2,req,name=Rand" json:"Rand,omitempty"` @@ -1604,6 +1607,8 @@ func (m *Response) GetIndex() uint64 { return 0 } +// SetMetaNodeCommand is for the initial metanode in a cluster or +// if the single host restarts and its hostname changes, this will update it type SetMetaNodeCommand struct { HTTPAddr *string `protobuf:"bytes,1,req,name=HTTPAddr" json:"HTTPAddr,omitempty"` TCPAddr *string `protobuf:"bytes,2,req,name=TCPAddr" json:"TCPAddr,omitempty"` diff --git a/vendor/github.com/influxdb/influxdb/tsdb/internal/meta.pb.go b/vendor/github.com/influxdb/influxdb/tsdb/internal/meta.pb.go index c580f4dba..9fa574dfb 100644 --- a/vendor/github.com/influxdb/influxdb/tsdb/internal/meta.pb.go +++ b/vendor/github.com/influxdb/influxdb/tsdb/internal/meta.pb.go @@ -120,3 +120,10 @@ func (m *Field) GetType() int32 { } return 0 } + +func init() { + proto.RegisterType((*Series)(nil), "internal.Series") + proto.RegisterType((*Tag)(nil), "internal.Tag") + proto.RegisterType((*MeasurementFields)(nil), "internal.MeasurementFields") + proto.RegisterType((*Field)(nil), "internal.Field") +}