Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
efa1dac
Fixed bazel install
sebastienvas Jan 10, 2017
315d072
Make docker slaves consistent with jenkinsci/slave
sebastienvas Jan 11, 2017
b76ea58
Align with latest istio/proxy. (#73)
chowchow316 Jan 12, 2017
8784e6a
Support HEAD request in transcoding (#74)
lizan Jan 14, 2017
3ed9393
Fixing bazel install for ubuntu salve
sebastienvas Jan 11, 2017
feda7e0
Use open-sourced scripts (#76)
kyessenov Jan 24, 2017
f284736
Update to istio/proxy with mixer_client integration. (#78)
qiwzhang Jan 27, 2017
007bf0f
Align with istio/proxy. (#79)
chowchow316 Jan 31, 2017
53abde6
Fix debian jessie package issue
sebastienvas Feb 2, 2017
8c26e96
Fixes typo in script
sebastienvas Feb 2, 2017
f9c1022
Modify test justification. (#83)
chowchow316 Feb 3, 2017
60b0ad0
Update NGINX to 1.11.9 (#75)
lizan Feb 6, 2017
07bf526
Remove mixer_client repo. (#85)
qiwzhang Feb 8, 2017
6d65f0e
Revert "Update NGINX to 1.11.9" (#86)
lizan Feb 8, 2017
1db5da6
Use grpc-go for interop tests (#88)
lizan Feb 13, 2017
d22d561
fix grpc docker build script (#90)
lizan Feb 13, 2017
9617591
Upgrade bazel to 0.4.4 (#92)
lizan Feb 14, 2017
8d42ba1
Update istio/proxy for GRPC v1.1.1 (#89)
lizan Feb 14, 2017
85b73ca
Fix ProxyFlow leak (#93)
lizan Feb 14, 2017
ac8708b
Basic GRPC request compression support (#94)
lizan Feb 15, 2017
3cb2548
Remove undefined flag of Go stress client (#95)
lizan Feb 16, 2017
7847760
t-test changes to check that x-endpoint-api-userinfo is received by g…
sarvaniv Feb 16, 2017
54d5686
Fix typo (#97)
sebastienvas Feb 16, 2017
1bee0c0
not to use api_key if service is not activated. (#98)
qiwzhang Feb 22, 2017
9c85906
Escape run description
sebastienvas Feb 11, 2017
220bd71
Fix grpc interop stress test script. (#103)
qiwzhang Feb 23, 2017
23958a9
try to escape json again. (#106)
qiwzhang Feb 23, 2017
e06ddf5
Add t test for fail wrong api key. (#104)
chowchow316 Feb 23, 2017
a6c8d3b
Allow grpc interop stress test fail once. (#105)
chowchow316 Feb 23, 2017
591f068
Update to latest endpoints-tool. (#110)
qiwzhang Feb 27, 2017
0fdaad9
Deprecate x-security (#101)
sarvaniv Feb 27, 2017
cd15ad4
Update CHANGELOG (#112)
kyessenov Mar 1, 2017
4961747
Update version number to 1.2.0. (#111)
kyessenov Mar 1, 2017
0db103f
Merge branch 'master' of https://github.com/cloudendpoints/esp into m…
sarvaniv Mar 3, 2017
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
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
# Release 1.1.0 01-03-2017

- Start deprecation of OpenAPI x-security to security (#101)
- Stop using api_key if service is not activated. (#98)
- Fail request if api_key is not valid
- Basic GRPC request compression support (#94)
- Support HEAD request in transcoding (#74)
- Rename release GCR images to gcr.io/endpoints-release (#60)
- NGINX high connection usage optimizations (#57)
- Make TLS client certificate optional in start_esp
- Start using AuthProvider audiences
- Notable bug fixes:
* Fix ProxyFlow leak (#93)
* Do not report latency for streaming requests
* Validate if contents of x-jwks_uri contains a public key
- General improvements to testing and build infrastructure:
* Update GRPC to 1.1.1
* Update grpc test service.json (#61)
* Add t test for fail wrong api key. (#104)
* Fix grpc interop stress test script. (#103)
* Use grpc-go for interop tests (#88)
* Fix debian jessie package issue
* Upgrade bazel to 0.4.4 (#92)
* t-test changes to check that x-endpoint-api-userinfo is received by grpc (#96)
service.
* Add transcoding metadata test
* Change scripts for new version file location.
* Move nginx_repositories close to its load.
* Fix start_esp main entry problem.
* Change script/release_tag_git to use upstream. (#44)
* Change release_tag_git to use absolute path.
* Not to save huge access.log for GCE. (#41)
* Fix bugs in script/release-publish. (#42)
* Use newer protobuf.bzl (#39)
* Use bazel to pull NGINX (#38)
* Fix GRPC interop test BUILD file (#37)
* Fix GRPC test BUILD file (#35)

# Release 1.0.1 06-12-2016

- Use GOOGLE_APPLICATION_CREDENTIALS in start-up script
- service_control_client not to send large Report (<1MB)
- Add max_report_size to statistics
- Package start-up script with Python PEX
- ESP CLI use same version for ESP docker image
- A workaround for Proto2.MessageOptions.* options
- Not call Check if api_key not provided
- Respect allow_cors configuration
- Log a warning if service control replies with a different service config

# Release 1.0.0 11-11-2016

- Fix for rename version => config_id
Expand Down
13 changes: 6 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -447,19 +447,19 @@ def buildPackages() {
'//src/tools:auth_token_gen',
'//test/grpc:grpc-test-client',
'//test/grpc:interop-client',
'//test/grpc:interop-metrics-client',
'//test/grpc:interop-server',
'//test/grpc:interop-stress-client',
'@org_golang_google_grpc//stress/metrics_client',
'@org_golang_google_grpc//interop/server',
'@org_golang_google_grpc//stress/client',
'//test/grpc:grpc-test_descriptor',
'//test/grpc:grpc-interop_descriptor',
]
def stashPaths = [
'bazel-bin/src/tools/auth_token_gen',
'bazel-bin/test/grpc/grpc-test-client',
'bazel-bin/test/grpc/interop-client',
'bazel-bin/test/grpc/interop-metrics-client',
'bazel-bin/test/grpc/interop-server',
'bazel-bin/test/grpc/interop-stress-client',
'bazel-bin/external/org_golang_google_grpc/stress/metrics_client/metrics_client',
'bazel-bin/external/org_golang_google_grpc/interop/server/server',
'bazel-bin/external/org_golang_google_grpc/stress/client/client',
'bazel-genfiles/test/grpc/grpc-test.descriptor',
'bazel-genfiles/test/grpc/grpc-interop.descriptor',
]
Expand Down Expand Up @@ -887,4 +887,3 @@ def initialize() {
// Updating submodules and cleaning files.
sh('script/setup && script/obliterate')
}

35 changes: 8 additions & 27 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#
# A Bazel (http://bazel.io) workspace for the Google Cloud Endpoints runtime.

ISTIO_PROXY = "b27d4b9fe2e5c17f0c4cdf92c73ee92a76ac02f8"
ISTIO_PROXY = "df4b7e43aad8e8a25d83606389c41d06ecef32ac"

git_repository(
name = "nginx",
Expand Down Expand Up @@ -57,7 +57,6 @@ load(
"@istio_proxy_git//contrib/endpoints:repositories.bzl",
"grpc_repositories",
"servicecontrol_client_repositories",
"mixer_client_repositories",
)
load(
"@istio_proxy_git//:repositories.bzl",
Expand Down Expand Up @@ -97,34 +96,12 @@ bind(

servicecontrol_client_repositories()

mixer_client_repositories()

protobuf_repositories()

googletest_repositories()

grpc_repositories()

load(
"@mixerclient_git//:repositories.bzl",
"mixerapi_repositories",
)

mixerapi_repositories(protobuf_repo="@protobuf_bzl//")

# Though GRPC has BUILD file, our own BUILD.grpc file is needed since it contains
# more targets including testing server and client.
# To generate the BUILD.grpc file, cherry-pick
# https://github.com/grpc/grpc/pull/7556
# and run ./tools/buildgen/generate_projects.sh in GRPC repo.
new_git_repository(
name = "grpc_test_git",
build_file = "third_party/BUILD.grpc",
commit = "d28417c856366df704200f544e72d31056931bce",
init_submodules = True,
remote = "https://github.com/grpc/grpc.git",
)

# Workaround for Bazel > 0.4.0 since it needs newer protobuf.bzl from:
# https://github.com/google/protobuf/pull/2246
# Do not use this git_repository for anything else than protobuf.bzl
Expand All @@ -149,7 +126,7 @@ bind(

git_repository(
name = "tools",
commit = "3327bae27498025ef8d33709f37182ae407fc517",
commit = "1bcac83ed2dc9c5e0be156a4c1801d435667f642",
remote = "https://github.com/cloudendpoints/endpoints-tools",
)

Expand Down Expand Up @@ -181,11 +158,11 @@ git_repository(
#
git_repository(
name = "io_bazel_rules_go",
commit = "3b13b2dba81e09ec213ccbd4da56ad332cb5d3dc",
commit = "76c63b5cd0d47c1f2b47ab4953db96c574af1c1d",
remote = "https://github.com/bazelbuild/rules_go.git",
)

load("@io_bazel_rules_go//go:def.bzl", "go_repositories", "go_repository")
load("@io_bazel_rules_go//go:def.bzl", "go_repositories", "go_repository", "new_go_repository")

go_repositories()

Expand All @@ -195,3 +172,7 @@ new_git_repository(
commit = "8616e8ee5e20a1704615e6c8d7afcdac06087a67",
remote = "https://github.com/golang/protobuf.git",
)

load("//test/grpc:repositories.bzl", "grpc_go_repositories")

grpc_go_repositories()
32 changes: 16 additions & 16 deletions doc/k8s/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,8 @@ paths:
description: "Authenication info."
schema:
$ref: "#/definitions/authInfoResponse"
x-security:
- google_jwt:
audiences:
# This must match the "aud" field in the JWT. You can add multiple
# audiences to accept JWTs from multiple clients.
- "echo.endpoints.sample.google.com"
security:
- {google_jwt: [], api_key: []}
"/auth/info/googleidtoken":
get:
description: "Returns the requests' authentication information."
Expand All @@ -82,12 +78,8 @@ paths:
description: "Authenication info."
schema:
$ref: "#/definitions/authInfoResponse"
x-security:
- google_id_token:
audiences:
# Your OAuth2 client's Client ID must be added here. You can add
# multiple client IDs to accept tokens from multiple clients.
- "YOUR-CLIENT-ID"
security:
- {google_id_token: [], api_key: []}
definitions:
echoMessage:
properties:
Expand Down Expand Up @@ -116,15 +108,23 @@ securityDefinitions:
flow: "implicit"
type: "oauth2"
# This must match the 'iss' field in the JWT.
x-issuer: "jwt-client.endpoints.sample.google.com"
x-google-issuer: "jwt-client.endpoints.sample.google.com"
# Update this with your service account's email address.
x-jwks_uri: "https://www.googleapis.com/service_accounts/v1/jwk/YOUR-SERVICE-ACCOUNT-EMAIL"
x-google-jwks_uri: "https://www.googleapis.com/service_accounts/v1/jwk/YOUR-SERVICE-ACCOUNT-EMAIL"
x-google-audiences:
# This must match the "aud" field in the JWT. You can add multiple
# audiences to accept JWTs from multiple clients.
- "echo.endpoints.sample.google.com"
# This section configures authentication using Google OAuth2 ID Tokens.
# ID Tokens can be obtained using OAuth2 clients, and can be used to access
# your API on behalf of a particular user.
google_id_token:
authorizationUrl: ""
flow: "implicit"
type: "oauth2"
x-issuer: "accounts.google.com"
x-jwks_uri: "https://www.googleapis.com/oauth2/v1/certs"
x-google-issuer: "accounts.google.com"
x-google-jwks_uri: "https://www.googleapis.com/oauth2/v1/certs"
x-google-audiences:
# Your OAuth2 client's Client ID must be added here. You can add
# multiple client IDs to accept tokens from multiple clients.
- "YOUR-CLIENT-ID"
2 changes: 1 addition & 1 deletion doc/testing.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Testing ESP with Bazel #

ESP is built using [Bazel](http://bazel.io) build tool. Install
[Bazel](http://bazel.io) version 0.4.3, following the [Bazel
[Bazel](http://bazel.io) version 0.4.4, following the [Bazel
documentation](http://bazel.io/docs/install.html).

# Building ESP #
Expand Down
4 changes: 2 additions & 2 deletions doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ On Linux, install:
## Bazel ##

ESP is built using [Bazel](http://bazel.io) build tool. Install
[Bazel](http://bazel.io) version 0.4.3, following the [Bazel
[Bazel](http://bazel.io) version 0.4.4, following the [Bazel
documentation](http://bazel.io/docs/install.html).

*Note:* Bazel is under active development and from time to time, ESP continuous
integration systems are upgraded to a new version of Bazel. Currently, ESP
requires Bazel 0.4.3.
requires Bazel 0.4.4.

The version of Bazel used by ESP continuous integration systems can be found in
the [linux-install-software](/script/linux-install-software)
Expand Down
2 changes: 1 addition & 1 deletion script/create-test-env-json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ cat << EOF > "${TEST_ENV}"
{
"test": "${TEST}",
"run_id": "${ID}",
"run_description": "${SUBJECT}",
"run_description": $(python -c "import json; a='${SUBJECT}'; print json.dumps(a)"),
"owner": "${AUTHOR}"
}
EOF
Expand Down
2 changes: 1 addition & 1 deletion script/linux-test-vm-bookstore
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function test_filename () {

function cleanup() {
# restore the original configs after we are done with the tests
git -C "${ROOT} checkout" \
git -C "${ROOT}" checkout \
"${APP_DIR}/swagger.json" \
"${APP_DIR}/app_esp.yaml" \
"${APP_DIR}/bookstore.js"
Expand Down
68 changes: 32 additions & 36 deletions script/test-grpc-interop
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,21 @@
#

# This script runs a grpc interop long-running test.
# It requires bazel build //test/grpc:all
# It requires bazel build following targets:
# //test/grpc:all
# @org_golang_google_grpc//stress/metrics_client
# @org_golang_google_grpc//interop/server
# @org_golang_google_grpc//stress/client
#set -x

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
. ${ROOT}/script/all-utilities \
|| { echo "Cannot load Bash utilities" ; exit 1 ; }

HOST=''
DURATION_IN_HOUR=0
RUN_LENGTH=120
TEST_CASES='empty_unary:10,large_unary:10,'
TEST_CASES+='empty_stream:10,client_streaming:10,half_duplex:10,ping_pong:20,server_streaming:10,'
TEST_CASES+='empty_stream:10,client_streaming:10,ping_pong:20,server_streaming:10,'
TEST_CASES+='status_code_and_message:10,custom_metadata:10'

while getopts :h:l:t: arg; do
Expand All @@ -52,16 +56,6 @@ done

[[ -n "${HOST}" ]] || error_exit 'Please specify a host with -h option.'

function print_test_metrics() {
local start_time=$(date +"%s")
while true; do
sleep 10
local curr_time=$(date +"%s")
echo -n "QPS report at $((curr_time - start_time)) seconds:"
$ROOT/bazel-bin/test/grpc/interop-metrics-client --total_only
done
}

# Waits for the proxy and backend to start.
HOST_IP=${HOST%:*}
HOST_PORT=${HOST#*:}
Expand All @@ -70,50 +64,52 @@ retry $ROOT/bazel-bin/test/grpc/interop-client --server_port "${HOST_PORT}" \
--server_host "${HOST_IP}" \
|| error_exit 'Failed to send one request, the proxy did not start properly.'

DURATION_IN_SEC=$((DURATION_IN_HOUR * 60 * 60))
[[ ${DURATION_IN_SEC} -gt 120 ]] || DURATION_IN_SEC=120

echo "Starts interop stress test at $(date)."
echo "Test during is: $((DURATION_IN_SECONDS / 60)) minutes."
echo "Test during is: $((DURATION_IN_SEC / 60)) minutes."
echo "Test cases are: ${TEST_CASES}"

# Start a background print job.
print_test_metrics&
PRINT_JOB=$!
trap "kill ${PRINT_JOB}" EXIT
# Start a background test client job.
$ROOT/bazel-bin/external/org_golang_google_grpc/stress/client/client \
--server_addresses "${HOST}" \
--num_channels_per_server 200 \
--num_stubs_per_channel 1 \
--test_cases "${TEST_CASES}" 2> /dev/null&
TEST_JOB=$!
trap "kill ${TEST_JOB}" EXIT

START_TIME=$(date +"%s")
END_TIME=$((START_TIME + DURATION_IN_HOUR * 60 * 60))
END_TIME=$((START_TIME + DURATION_IN_SEC))
RUN_COUNT=0
SUCCESS_TIME=0
FAIL_COUNT=0

detect_memory_leak_init "http://${HOST}"

while true; do
CURR_TIME=$(date +"%s")
echo "Test time: $((CURR_TIME - START_TIME)) seconds, success time: ${SUCCESS_TIME} seconds."
((RUN_COUNT++))

timeout $((RUN_LENGTH + 10)) $ROOT/bazel-bin/test/grpc/interop-stress-client \
--server_addresses "${HOST}" \
--test_duration_secs "${RUN_LENGTH}" \
--num_channels_per_server 200 \
--num_stubs_per_channel 1 \
--do_not_abort_on_transient_failures false \
--test_cases "${TEST_CASES}" \
&& ((SUCCESS_TIME += RUN_LENGTH))

detect_memory_leak_check ${RUN_COUNT}
sleep 10
METRIC_RESULT=$("$ROOT/bazel-bin/external/org_golang_google_grpc/stress/metrics_client/metrics_client" \
--total_only --metrics_server_address=localhost:8081 2>&1)
QPS=$(echo ${METRIC_RESULT}|awk '{print $NF}')
echo "Metric report at $((CURR_TIME - START_TIME)) seconds: ${QPS} qps"
# Count non zero QPS as success.
[[ ${QPS} -gt 100 ]] || ((FAIL_COUNT++))

# Break if test has run long enough.
[[ $(date +"%s") -lt ${END_TIME} ]] || break
done

END_TIME=$(date +"%s")
echo "Total test time: $((END_TIME - START_TIME)) seconds, success time: ${SUCCESS_TIME} seconds at $(date)."
echo "Total test count: ${RUN_COUNT}, failed count: ${FAIL_COUNT}."

TOTAL_TIME=$((END_TIME - START_TIME))
FAILURE_TIME=$((TOTAL_TIME - SUCCESS_TIME))
# If failure time is more than %5 of total test time, mark failed.
RESULT=0
[[ ${FAILURE_TIME} -gt $((TOTAL_TIME / 20)) ]] && RESULT=1
if [[ ${FAIL_COUNT} -gt $((RUN_COUNT / 20)) && ${FAIL_COUNT} -gt 1 ]] ; then
RESULT=1
fi

# We fail the test if memory increase is large.
detect_memory_leak_final && MEMORY_LEAK=0 || MEMORY_LEAK=1
Expand Down
Loading