Skip to content

Commit

Permalink
Merge pull request #445 from uber/dev
Browse files Browse the repository at this point in the history
Release v1.0.8
  • Loading branch information
prashantv committed Jul 16, 2016
2 parents ebbdb72 + afcd68c commit 21ec325
Show file tree
Hide file tree
Showing 147 changed files with 6,921 additions and 1,592 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,5 +1,6 @@
build
Godeps/_workspace
vendor/
thrift-gen-release/

# Lint output
Expand All @@ -14,3 +15,4 @@ lint.log
.DS_Store
.idea
tchannel-go.iml
.vscode
6 changes: 5 additions & 1 deletion .travis.yml
@@ -1,13 +1,17 @@
language: go
cache:
directories:
- Godeps/_workspace/src
- $HOME/.glide/cache
go:
- 1.4
- 1.5
- 1.6
- 1.7rc1
- tip
install: make install_ci
env:
# Set higher timeouts for Travis
- TEST_TIMEOUT_SCALE=20
script:
- make test_ci
- make cover_ci
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,22 @@
Changelog
=========

# 1.0.8

* Remove dependency on "testing" from "tchannel-go" introduced in v1.0.7.

# 1.0.7

* Add CallOptions() to IncomingCall which can be used as the call option
when making outbound calls to proxy all transport headers.
* Add tracing information to all error frames generated by the library.
* Add GetHandlers for getting all registered methods on a subchannel.
* Fix peer score not being calculated when adding a new outbound connections
* Expose the peer information for outbound calls.
* Support a separate connection timeout from the context timeout, useful for
streaming calls where the stream timeout may be much longer than the
connection timeout.

# 1.0.6

* Fix trace span encoding fields in the wrong order
Expand Down
66 changes: 0 additions & 66 deletions Godeps/Godeps.json

This file was deleted.

5 changes: 0 additions & 5 deletions Godeps/Readme

This file was deleted.

63 changes: 33 additions & 30 deletions Makefile
@@ -1,4 +1,4 @@
GODEPS := $(shell pwd)/Godeps/_workspace
export GO15VENDOREXPERIMENT=1
GO_VERSION := $(shell go version | awk '{ print $$3 }')
GO_MINOR_VERSION := $(word 2,$(subst ., ,$(GO_VERSION)))
LINTABLE_MINOR_VERSIONS := 5 6
Expand All @@ -10,29 +10,25 @@ ifneq ($(filter $(FMTABLE_MINOR_VERSIONS),$(GO_MINOR_VERSION)),)
SHOULD_LINT_FMT := true
endif

OLDGOPATH := $(GOPATH)
PATH := $(GODEPS)/bin:$(PATH)
PATH := $(GOPATH)/bin:$(PATH)
EXAMPLES=./examples/bench/server ./examples/bench/client ./examples/ping ./examples/thrift ./examples/hyperbahn/echo-server
PKGS := . ./atomic ./json ./hyperbahn ./thrift ./typed ./trace $(EXAMPLES)
TEST_ARG ?= -race -v -timeout 2m
PKGS := . ./json ./hyperbahn ./thrift ./typed ./trace $(EXAMPLES)
TEST_ARG ?= -race -v -timeout 5m
BUILD := ./build
THRIFT_GEN_RELEASE := ./thrift-gen-release
THRIFT_GEN_RELEASE_LINUX := $(THRIFT_GEN_RELEASE)/linux-x86_64
THRIFT_GEN_RELEASE_DARWIN := $(THRIFT_GEN_RELEASE)/darwin-x86_64
SRCS := $(foreach pkg,$(PKGS),$(wildcard $(pkg)/*.go))
export GOPATH = $(GODEPS):$(OLDGOPATH)

PLATFORM := $(shell uname -s | tr '[:upper:]' '[:lower:]')
ARCH := $(shell uname -m)
THRIFT_REL := ./scripts/travis/thrift-release/$(PLATFORM)-$(ARCH)

export PATH := $(realpath $(THRIFT_REL)):$(PATH)

OLD_GOPATH := $(GOPATH)
VENDOR_PATH := $(PWD)/.tmp/vendor

# Separate packages that use testutils and don't, since they can have different flags.
# This is especially useful for timeoutMultiplier and connectionLog
TESTUTILS_TEST_PKGS := . hyperbahn testutils http json thrift pprof trace
NO_TESTUTILS_PKGS := atomic stats thrift/thrift-gen tnet typed
export PATH := $(realpath $(THRIFT_REL)):$(PATH)
export GOPATH := $(VENDOR_PATH):$(GOPATH)

# Cross language test args
TEST_HOST=127.0.0.1
Expand All @@ -52,21 +48,33 @@ setup:
get_thrift:
scripts/travis/get-thrift.sh

# We want to remove `vendor` dir because thrift-gen tests don't work with it.
# However, glide install even with --cache-gopath option leaves GOPATH at HEAD,
# not at the desired versions from glide.lock, which are only applied to `vendor`
# dir. So we move `vendor` to a temp dir and prepend it to GOPATH.
# Note that glide itself is still executed against the original GOPATH.
install:
GOPATH=$(GODEPS) go get github.com/tools/godep
GOPATH=$(GODEPS) godep restore -v
GOPATH=$(OLD_GOPATH) glide --debug install --cache --cache-gopath
rm -rf $(VENDOR_PATH)
mkdir -p $(VENDOR_PATH)
mv vendor $(VENDOR_PATH)/src

install_lint:
ifdef SHOULD_LINT
@echo "Installing golint, since we expect to lint on" $(GO_VERSION)
GOPATH=$(GODEPS) go get github.com/golang/lint/golint
GOPATH=$(OLD_GOPATH) go get -u -f github.com/golang/lint/golint
else
@echo "Not installing golint, since we don't lint on" $(GO_VERSION)
endif

install_ci: get_thrift install
go get -u github.com/mattn/goveralls
install_glide:
GOPATH=$(OLD_GOPATH) go get -u github.com/Masterminds/glide

install_ci: install_glide install_lint get_thrift install
GOPATH=$(OLD_GOPATH) go get -u github.com/mattn/goveralls

install_test:
go test -i $(TEST_ARG) $(addprefix github.com/uber/tchannel-go/,$(NO_TESTUTILS_PKGS) $(TESTUTILS_TEST_PKGS))
go test -i $(TEST_ARG) $(shell glide nv)

help:
@egrep "^# target:" [Mm]akefile | sort -
Expand All @@ -82,22 +90,17 @@ fmt format:
go fmt $(PKGS)
echo

godep:
rm -rf Godeps
godep save ./...

test_ci: test

test: clean setup install_test
@echo Testing packages:
go test -parallel=4 $(TEST_ARG) $(addprefix github.com/uber/tchannel-go/,$(NO_TESTUTILS_PKGS))
go test -parallel=4 -timeoutMultiplier=10 $(TEST_ARG) $(addprefix github.com/uber/tchannel-go/,$(TESTUTILS_TEST_PKGS))
go test -parallel=4 $(TEST_ARG) $(shell glide nv)
@echo Running frame pool tests
go test -run TestFramesReleased -stressTest $(TEST_ARG) -timeoutMultiplier 10
go test -run TestFramesReleased -stressTest $(TEST_ARG)

benchmark: clean setup
echo Running benchmarks:
go test $(PKGS) -bench=. -parallel=4
go test $(PKGS) -bench=. -cpu=1 -benchmem -run NONE

cover_profile: clean setup
@echo Testing packages:
Expand All @@ -111,7 +114,7 @@ cover_ci: cover_profile
goveralls -coverprofile=$(BUILD)/coverage.out -service=travis-ci || echo -e "\x1b[31mCoveralls failed\x1b[m"


FILTER := grep -v -e '_string.go' -e '/gen-go/' -e '/mocks/' -e 'Godeps/' -e 'vendor/'
FILTER := grep -v -e '_string.go' -e '/gen-go/' -e '/mocks/' -e 'vendor/'
lint:
ifdef SHOULD_LINT
@echo "Linters are enabled on" $(GO_VERSION)
Expand Down Expand Up @@ -158,10 +161,10 @@ thrift_gen:
rm -rf trace/thrift/gen-go/tcollector && $(BUILD)/thrift-gen --generateThrift --inputFile trace/tcollector.thrift --outputDir trace/thrift/gen-go/

release_thrift_gen: clean setup
GOOS=linux GOARCH=amd64 godep go build -o $(THRIFT_GEN_RELEASE_LINUX)/thrift-gen ./thrift/thrift-gen
GOOS=darwin GOARCH=amd64 godep go build -o $(THRIFT_GEN_RELEASE_DARWIN)/thrift-gen ./thrift/thrift-gen
GOOS=linux GOARCH=amd64 go build -o $(THRIFT_GEN_RELEASE_LINUX)/thrift-gen ./thrift/thrift-gen
GOOS=darwin GOARCH=amd64 go build -o $(THRIFT_GEN_RELEASE_DARWIN)/thrift-gen ./thrift/thrift-gen
tar -czf thrift-gen-release.tar.gz $(THRIFT_GEN_RELEASE)
mv thrift-gen-release.tar.gz $(THRIFT_GEN_RELEASE)/

.PHONY: all help clean fmt format get_thrift install install_ci release_thrift_gen packages_test test test_ci lint
.PHONY: all help clean fmt format get_thrift install install_ci install_lint install_glide release_thrift_gen packages_test test test_ci lint
.SILENT: all help clean fmt format test lint

0 comments on commit 21ec325

Please sign in to comment.