Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 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
ca63cc2
Quick fix of bookstore-server race (#115)
lizan Mar 4, 2017
c118f42
Support apikey based traffic restriction (#120)
mangchiandjjoe Mar 20, 2017
61d8627
fix gcloud command (#121)
wlu2016 Mar 21, 2017
af54eb3
add -- for gcloud compute ssh (#122)
wlu2016 Mar 22, 2017
5a9004c
Dev (#123)
wlu2016 Mar 22, 2017
309b1f8
update gcloud ssh command (#124)
wlu2016 Mar 22, 2017
d5fc531
Made test cases waiting for the report respose (#125)
mangchiandjjoe Mar 22, 2017
354ba10
add a version flag to support rollback (#126)
wlu2016 Mar 22, 2017
c57b04a
Updated the commit id of endpoints tools repo (#128)
mangchiandjjoe Mar 24, 2017
4d20e54
Set gRPC max send/receive message size to unlimited (#132)
lizan Apr 5, 2017
b9fdf8e
Comply with istio/proxy#225 (#134)
lizan Apr 7, 2017
a304743
Merge rate_limit branch to master (#137)
mangchiandjjoe Apr 10, 2017
8588ccf
Merge branch 'master' of https://github.com/cloudendpoints/esp into f…
sarvaniv Apr 10, 2017
f13c99d
Another merge to include Jae's changes.
sarvaniv Apr 10, 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
6 changes: 3 additions & 3 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 = "cfdb30323aa72b680bab1664035a1bbc200379c0"
ISTIO_PROXY = "9442a836988332f397f874e0b8ae9edafcd53425"

git_repository(
name = "nginx",
Expand Down Expand Up @@ -126,7 +126,7 @@ bind(

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

Expand Down Expand Up @@ -158,7 +158,7 @@ git_repository(
#
git_repository(
name = "io_bazel_rules_go",
commit = "76c63b5cd0d47c1f2b47ab4953db96c574af1c1d",
commit = "2d9f328a9723baf2d037ba9db28d9d0e30683938", # Apr 6, 2017 (buildifier fix)
remote = "https://github.com/bazelbuild/rules_go.git",
)

Expand Down
2 changes: 1 addition & 1 deletion docker/ingress/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ cp $DEB $ROOT/docker/ingress
cp $ROOT/bazel-bin/test/src/ingress $ROOT/docker/ingress
cp $ROOT/test/src/controller/nginx.tmpl $ROOT/docker/ingress
docker build -t ${IMAGE} $ROOT/docker/ingress || error_exit "Failed to build"
gcloud docker push ${IMAGE} || error_exit "Failed to upload docker image"
gcloud docker -- push ${IMAGE} || error_exit "Failed to upload docker image"
6 changes: 3 additions & 3 deletions script/jenkins-build-docker-slave
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ TOOLS_BUCKET=''
function update_image() {
local image="${1}"
[[ ${FORCE} == true ]] && return 0
${GCLOUD} docker pull "${image}"
${GCLOUD} docker -- pull "${image}"
local image_exists=${?}
[[ ${image_exists} -eq 0 ]] && return 1
return 0
Expand Down Expand Up @@ -75,7 +75,7 @@ if [[ "${BUILD}" == true ]]; then
run retry -n 10 docker build --build-arg TOOLS_BUCKET="${TOOLS_BUCKET}" --no-cache -t ${IMAGE} \
-f "${DOCKER_FILE}" . || error_exit "Could not build ${SLAVE}"
echo "Pushing Docker image: ${IMAGE}"
retry -n 3 ${GCLOUD} docker push "${IMAGE}" \
retry -n 3 ${GCLOUD} docker -- push "${IMAGE}" \
|| error_exit "Failed to push tag ${IMAGE}."
fi
fi
Expand All @@ -86,7 +86,7 @@ if [[ -n "${TAG}" ]]; then
retry -n 3 docker tag "${IMAGE}" ${TAG}

echo "Pushing Docker image: ${TAG}"
retry -n 3 ${GCLOUD} docker push "${TAG}" \
retry -n 3 ${GCLOUD} docker -- push "${TAG}" \
|| error_exit "Failed to push tag ${TAG}."
fi

6 changes: 3 additions & 3 deletions script/linux-build-docker
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ done
[[ -f "${DEB}" ]] || error_exit "Cannot find Debian package ${DEB}"

echo "Checking if docker image ${IMAGE} exists.."
gcloud docker pull "${IMAGE}" \
gcloud docker -- pull "${IMAGE}" \
&& { echo "Image ${IMAGE} already exists; skipping"; exit 0; }

echo "Building Endpoints Runtime docker image."
Expand Down Expand Up @@ -86,14 +86,14 @@ if [[ -n "${CONFIG}" ]]; then

echo "Pushing Custom Docker image: ${IMAGE}"
retry -n 10 -s 10 \
gcloud docker push "${IMAGE}" \
gcloud docker -- push "${IMAGE}" \
|| error_exit "Failed to upload custom Docker image to gcr."
else

echo "Pushing Docker image: ${IMAGE}"

# Try 10 times, shortest wait is 10 seconds, exponential back-off.
retry -n 10 -s 10 \
gcloud docker push "${IMAGE}" \
gcloud docker -- push "${IMAGE}" \
|| error_exit "Failed to upload Docker image to gcr."
fi
2 changes: 1 addition & 1 deletion script/linux-gae-instance
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function download_nginx_logs() {

retry -n 2 -s 10 \
${GCLOUD} compute ssh --project=${PROJECT} --zone=${vm_zone} ${vm_name} \
"sudo tar czf \"${remote_archive}\" /var/log/ ; sudo chmod 777 \"${remote_archive}\"" \
--command="sudo tar czf ${remote_archive} /var/log/; sudo chmod 777 ${remote_archive}" \
|| error_exit "Cannot tar backend VM logs."

retry -n 2 -s 10 \
Expand Down
7 changes: 4 additions & 3 deletions script/release-stable
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ END_USAGE

GCLOUD=$(which gcloud) || GCLOUD=~/google-cloud-sdk/bin/gcloud
DEBIAN_PACKAGE_REPOSITORY=''
VERSION="$(command cat ${ROOT}/src/nginx/version)"

while getopts :g:r: arg; do
while getopts :g:r:v: arg; do
case ${arg} in
g) GCLOUD="${OPTARG}";;
r) DEBIAN_PACKAGE_REPOSITORY="${OPTARG}";;
v) VERSION="${OPTARG}";;
*) usage "Invalid option: -${OPTARG}";;
esac
done
Expand All @@ -70,7 +72,6 @@ which rapture > /dev/null 2>&1 \

set -x

VERSION="$(command cat ${ROOT}/src/nginx/version)"
# Minor base is 1.0 if version is 1.0.0
MINOR_BASE_VERSION=${VERSION%.*}
# Major base is 1 if version is 1.0.0
Expand All @@ -82,7 +83,7 @@ function tag_stable_image() {

docker_tag_f "${image}" "${stable}"

retry "${GCLOUD}" docker push "${stable}" \
retry "${GCLOUD}" docker -- push "${stable}" \
|| error_exit "ERROR: failed to push '${stable}'"
}

Expand Down
1 change: 1 addition & 0 deletions src/grpc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ cc_library(
],
visibility = ["//visibility:public"],
deps = [
"@istio_proxy_git//contrib/endpoints/src/grpc/transcoding:transcoder_input_stream",
"//external:grpc",
"//external:grpc++",
"//external:protobuf",
Expand Down
2 changes: 1 addition & 1 deletion src/grpc/zero_copy_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void GrpcZeroCopyInputStream::BackUp(int count) {
}
}

::google::protobuf::int64 GrpcZeroCopyInputStream::ByteCount() const {
int64_t GrpcZeroCopyInputStream::BytesAvailable() const {
return (current_buffer_size_ - position_) + serializer_.ByteCount();
}

Expand Down
8 changes: 5 additions & 3 deletions src/grpc/zero_copy_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include <deque>

#include "contrib/endpoints/src/grpc/transcoding/transcoder_input_stream.h"
#include "google/protobuf/io/zero_copy_stream.h"
#include "grpc++/support/byte_buffer.h"
#include "src/grpc/message_serializer.h"
Expand All @@ -38,7 +39,7 @@ namespace grpc {

// ZeroCopyInputStream implementation over a stream of gRPC messages.
class GrpcZeroCopyInputStream
: public ::google::protobuf::io::ZeroCopyInputStream {
: public ::google::api_manager::transcoding::TranscoderInputStream {
public:
GrpcZeroCopyInputStream();

Expand All @@ -53,8 +54,9 @@ class GrpcZeroCopyInputStream

bool Next(const void** data, int* size);
void BackUp(int count);
bool Skip(int count) { return false; } // not supported
::google::protobuf::int64 ByteCount() const;
bool Skip(int count) { return false; } // not supported
::google::protobuf::int64 ByteCount() const { return 0; } // Not implemented
int64_t BytesAvailable() const;

private:
GrpcMessageSerializer serializer_;
Expand Down
38 changes: 19 additions & 19 deletions src/grpc/zero_copy_stream_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,63 +86,63 @@ TEST_F(GrpcZeroCopyInputStreamTest, SimpleRead) {
stream.AddMessage(CreateByteBuffer(SliceData{slice21, slice22}), true);
stream.Finish();

// Test ByteCount()
// Test BytesAvailable()
EXPECT_EQ(slice11.size() + slice12.size() + slice21.size() + slice22.size() +
10, // +10 bytes for two delimiters
stream.ByteCount());
stream.BytesAvailable());

// Test the message1 delimiter
ASSERT_TRUE(stream.Next(&data, &size));
ASSERT_EQ(5, size);
EXPECT_EQ(slice11.size() + slice12.size(),
DelimiterToSize(reinterpret_cast<const unsigned char *>(data)));

// Test ByteCount()
// Test BytesAvailable()
EXPECT_EQ(slice11.size() + slice12.size() + slice21.size() + slice22.size() +
5, // +5 bytes for one delimiter
stream.ByteCount());
stream.BytesAvailable());

// Test the slices
ASSERT_TRUE(stream.Next(&data, &size));
ASSERT_EQ(slice11.size(), size);
EXPECT_EQ(slice11, std::string(reinterpret_cast<const char *>(data), size));

// Test ByteCount()
// Test BytesAvailable()
EXPECT_EQ(slice12.size() + slice21.size() + slice22.size() +
5, // +5 bytes for one delimiter
stream.ByteCount());
stream.BytesAvailable());

ASSERT_TRUE(stream.Next(&data, &size));
ASSERT_EQ(slice12.size(), size);
EXPECT_EQ(slice12, std::string(reinterpret_cast<const char *>(data), size));

// Test ByteCount()
// Test BytesAvailable()
EXPECT_EQ(slice21.size() + slice22.size() + 5, // +5 bytes for one delimiter
stream.ByteCount());
stream.BytesAvailable());

// Test the message2 delimiter
ASSERT_TRUE(stream.Next(&data, &size));
ASSERT_EQ(5, size);
EXPECT_EQ(slice21.size() + slice22.size(),
DelimiterToSize(reinterpret_cast<const unsigned char *>(data)));

// Test ByteCount()
EXPECT_EQ(slice21.size() + slice22.size(), stream.ByteCount());
// Test BytesAvailable()
EXPECT_EQ(slice21.size() + slice22.size(), stream.BytesAvailable());

// Test the slices
ASSERT_TRUE(stream.Next(&data, &size));
ASSERT_EQ(slice21.size(), size);
EXPECT_EQ(slice21, std::string(reinterpret_cast<const char *>(data), size));

// Test ByteCount()
EXPECT_EQ(slice22.size(), stream.ByteCount());
// Test BytesAvailable()
EXPECT_EQ(slice22.size(), stream.BytesAvailable());

ASSERT_TRUE(stream.Next(&data, &size));
ASSERT_EQ(slice22.size(), size);
EXPECT_EQ(slice22, std::string(reinterpret_cast<const char *>(data), size));

// Test the end of the stream
EXPECT_EQ(0, stream.ByteCount());
EXPECT_EQ(0, stream.BytesAvailable());
EXPECT_FALSE(stream.Next(&data, &size));
}

Expand All @@ -167,9 +167,9 @@ TEST_F(GrpcZeroCopyInputStreamTest, Backups) {
// Back up
stream.BackUp(5);

// Test the ByteCount()
// Test the BytesAvailable()
EXPECT_EQ(slice1.size() + slice2.size() + 5, // +5 bytes for the delimiter
stream.ByteCount());
stream.BytesAvailable());

// Test the slice again
ASSERT_TRUE(stream.Next(&data, &size));
Expand All @@ -184,14 +184,14 @@ TEST_F(GrpcZeroCopyInputStreamTest, Backups) {

// Back up & test again
stream.BackUp(size);
EXPECT_EQ(slice1.size() + slice2.size(), stream.ByteCount());
EXPECT_EQ(slice1.size() + slice2.size(), stream.BytesAvailable());
ASSERT_TRUE(stream.Next(&data, &size));
ASSERT_EQ(slice1.size(), size);
EXPECT_EQ(slice1, std::string(reinterpret_cast<const char *>(data), size));

// Now Back up 10 bytes & test again
stream.BackUp(10);
EXPECT_EQ(10 + slice2.size(), stream.ByteCount());
EXPECT_EQ(10 + slice2.size(), stream.BytesAvailable());
ASSERT_TRUE(stream.Next(&data, &size));
ASSERT_EQ(10, size);
EXPECT_EQ(slice1.substr(slice1.size() - 10),
Expand All @@ -204,14 +204,14 @@ TEST_F(GrpcZeroCopyInputStreamTest, Backups) {

// Back up and test again
stream.BackUp(size);
EXPECT_EQ(slice2.size(), stream.ByteCount());
EXPECT_EQ(slice2.size(), stream.BytesAvailable());
ASSERT_TRUE(stream.Next(&data, &size));
ASSERT_EQ(slice2.size(), size);
EXPECT_EQ(slice2, std::string(reinterpret_cast<const char *>(data), size));

// Now Back up size - 1 bytes (all but 1) and check again
stream.BackUp(size - 1);
EXPECT_EQ(slice2.size() - 1, stream.ByteCount());
EXPECT_EQ(slice2.size() - 1, stream.BytesAvailable());
ASSERT_TRUE(stream.Next(&data, &size));
ASSERT_EQ(slice2.size() - 1, size);
EXPECT_EQ(slice2.substr(1),
Expand Down
10 changes: 8 additions & 2 deletions src/nginx/grpc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,14 @@ std::pair<Status, std::shared_ptr<::grpc::GenericStub>> GrpcGetStub(
return std::make_pair(Status::OK, it->second);
}

auto result = std::make_shared<::grpc::GenericStub>(
::grpc::CreateChannel(address, ::grpc::InsecureChannelCredentials()));
::grpc::ChannelArguments channel_arguments;

channel_arguments.SetMaxReceiveMessageSize(INT_MAX);
channel_arguments.SetMaxSendMessageSize(INT_MAX);

auto result =
std::make_shared<::grpc::GenericStub>(::grpc::CreateCustomChannel(
address, ::grpc::InsecureChannelCredentials(), channel_arguments));

if (result) {
espcf->grpc_stubs.emplace(address, result);
Expand Down
5 changes: 5 additions & 0 deletions src/nginx/t/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ nginx_suite(
"grpc_grpc_fallback.t",
"grpc_grpc_override.t",
"grpc_large_request.t",
"grpc_large_response.t",
"grpc_large_streaming.t",
"grpc_long_streaming.t",
"grpc_metadata.t",
Expand Down Expand Up @@ -171,6 +172,7 @@ nginx_suite(
"check_custom_api_key.t",
"check_default.t",
"check_invalid_api_key.t",
"check_key_restriction.t",
"check_no_consumer.t",
"check_referer.t",
"check_report_body.t",
Expand All @@ -188,6 +190,9 @@ nginx_suite(
"multiple_apis.t",
"no_backend.t",
"no_service_control.t",
"quota.t",
"quota_api_not_available.t",
"quota_exhausted.t",
"reject_unrecognized.t",
"report_3xx.t",
"report_4xx.t",
Expand Down
Loading