Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into api-versioning-md
Browse files Browse the repository at this point in the history
  • Loading branch information
htuch committed Oct 2, 2019
2 parents 38c8041 + c776fc3 commit 58553dc
Show file tree
Hide file tree
Showing 313 changed files with 5,648 additions and 6,765 deletions.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ build:remote-clang --config=remote
build:remote-clang --config=rbe-toolchain-clang

# Docker sandbox
build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build@sha256:9236915d10004a35f2439ce4a1c33c1dbb06f95f84c4a4497d4e4f95cdc9e07f
build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build@sha256:1500b75cb9bc2184a26f72f63631e926cd05d6ee628e6fd005f069d2f9756ac7
build:docker-sandbox --spawn_strategy=docker
build:docker-sandbox --strategy=Javac=docker
build:docker-sandbox --strategy=Closure=docker
Expand Down
13 changes: 2 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ executors:
ubuntu-build:
description: "A regular build executor based on ubuntu image"
docker:
# NOTE: Update bazel/toolchains/rbe_toolchains_config.bzl with sha256 digest to match the image here.
- image: envoyproxy/envoy-build:cb15cc3d2010aff77d6e022ddf6d723fa8becbc0
# NOTE: Update this from https://github.com/envoyproxy/envoy-build-tools/blob/master/toolchains/rbe_toolchains_config.bzl#L7
- image: envoyproxy/envoy-build-ubuntu@sha256:1500b75cb9bc2184a26f72f63631e926cd05d6ee628e6fd005f069d2f9756ac7
resource_class: xlarge
working_directory: /source

Expand Down Expand Up @@ -103,14 +103,6 @@ jobs:
ci/do_circle_ci.sh bazel.clang_tidy
no_output_timeout: 60m

build_image:
docker:
- image: google/cloud-sdk
steps:
- run: rm -rf /home/circleci/project/.git # CircleCI git caching is likely broken
- checkout
- setup_remote_docker
- run: ci/build_container/docker_push.sh
docs:
executor: ubuntu-build
steps:
Expand Down Expand Up @@ -143,7 +135,6 @@ workflows:
- coverage_publish:
requires: [coverage]
- clang_tidy
- build_image
- docs:
filters:
tags:
Expand Down
3 changes: 3 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ CheckOptions:

- key: readability-identifier-naming.ParameterCase
value: 'lower_case'

- key: readability-identifier-naming.TypeAliasCase
value: 'CamelCase'
31 changes: 30 additions & 1 deletion api/envoy/api/v2/cds.proto
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ service ClusterDiscoveryService {
}

// Configuration for a single upstream cluster.
// [#comment:next free field: 44]
// [#comment:next free field: 45]
message Cluster {
// Refer to :ref:`service discovery type <arch_overview_service_discovery_types>`
// for an explanation on each type.
Expand Down Expand Up @@ -436,6 +436,22 @@ message Cluster {
bool close_connections_on_host_set_change = 6;
}

message RefreshRate {
// Specifies the base interval between refreshes. This parameter is required and must be greater
// than zero and less than
// :ref:`max_interval <envoy_api_field_Cluster.RefreshRate.max_interval>`.
google.protobuf.Duration base_interval = 1 [(validate.rules).duration = {
required: true
gt {nanos: 1000000}
}];

// Specifies the maximum interval between refreshes. This parameter is optional, but must be
// greater than or equal to the
// :ref:`base_interval <envoy_api_field_Cluster.RefreshRate.base_interval>` if set. The default
// is 10 times the :ref:`base_interval <envoy_api_field_Cluster.RefreshRate.base_interval>`.
google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {nanos: 1000000}}];
}

reserved 12, 15;

// Configuration to use different transport sockets for different endpoints.
Expand Down Expand Up @@ -614,6 +630,19 @@ message Cluster {
// this setting is ignored.
google.protobuf.Duration dns_refresh_rate = 16 [(validate.rules).duration = {gt {}}];

// If the DNS failure refresh rate is specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`,
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// this is used as the cluster’s DNS refresh rate when requests are failing. If this setting is
// not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types
// other than :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>` and
// :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>` this setting is
// ignored.
//
// Note: Currently, DNS failures and empty DNS responses are not treated differently and this
// configuration is applied in both situations.
RefreshRate dns_failure_refresh_rate = 44;

// Optional configuration for setting cluster's DNS refresh rate. If the value is set to true,
// cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS
// resolution.
Expand Down
7 changes: 4 additions & 3 deletions api/envoy/api/v2/discovery.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ message DiscoveryRequest {

// nonce corresponding to DiscoveryResponse being ACK/NACKed. See above
// discussion on version_info and the DiscoveryResponse nonce comment. This
// may be empty if no nonce is available, e.g. at startup or for non-stream
// xDS implementations.
// may be empty only if 1) this is a non-persistent-stream xDS such as HTTP,
// or 2) the client has not yet accepted an update in this xDS stream (unlike
// delta, where it is populated only for new explicit ACKs).
string response_nonce = 5;

// This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`
Expand Down Expand Up @@ -176,7 +177,7 @@ message DeltaDiscoveryRequest {
// When the DeltaDiscoveryRequest is a ACK or NACK message in response
// to a previous DeltaDiscoveryResponse, the response_nonce must be the
// nonce in the DeltaDiscoveryResponse.
// Otherwise response_nonce must be omitted.
// Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted.
string response_nonce = 6;

// This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`
Expand Down
31 changes: 30 additions & 1 deletion api/envoy/api/v3alpha/cds.proto
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ service ClusterDiscoveryService {
}

// Configuration for a single upstream cluster.
// [#comment:next free field: 44]
// [#comment:next free field: 45]
message Cluster {
// Refer to :ref:`service discovery type <arch_overview_service_discovery_types>`
// for an explanation on each type.
Expand Down Expand Up @@ -430,6 +430,22 @@ message Cluster {
bool close_connections_on_host_set_change = 6;
}

message RefreshRate {
// Specifies the base interval between refreshes. This parameter is required and must be greater
// than zero and less than
// :ref:`max_interval <envoy_api_field_Cluster.RefreshRate.max_interval>`.
google.protobuf.Duration base_interval = 1 [(validate.rules).duration = {
required: true
gt {nanos: 1000000}
}];

// Specifies the maximum interval between refreshes. This parameter is optional, but must be
// greater than or equal to the
// :ref:`base_interval <envoy_api_field_Cluster.RefreshRate.base_interval>` if set. The default
// is 10 times the :ref:`base_interval <envoy_api_field_Cluster.RefreshRate.base_interval>`.
google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {nanos: 1000000}}];
}

reserved 12, 15;

// Configuration to use different transport sockets for different endpoints.
Expand Down Expand Up @@ -608,6 +624,19 @@ message Cluster {
// this setting is ignored.
google.protobuf.Duration dns_refresh_rate = 16 [(validate.rules).duration = {gt {}}];

// If the DNS failure refresh rate is specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`,
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// this is used as the cluster’s DNS refresh rate when requests are failing. If this setting is
// not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types
// other than :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>` and
// :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>` this setting is
// ignored.
//
// Note: Currently, DNS failures and empty DNS responses are not treated differently and this
// configuration is applied in both situations.
RefreshRate dns_failure_refresh_rate = 44;

// Optional configuration for setting cluster's DNS refresh rate. If the value is set to true,
// cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS
// resolution.
Expand Down
7 changes: 4 additions & 3 deletions api/envoy/api/v3alpha/discovery.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ message DiscoveryRequest {

// nonce corresponding to DiscoveryResponse being ACK/NACKed. See above
// discussion on version_info and the DiscoveryResponse nonce comment. This
// may be empty if no nonce is available, e.g. at startup or for non-stream
// xDS implementations.
// may be empty only if 1) this is a non-persistent-stream xDS such as HTTP,
// or 2) the client has not yet accepted an update in this xDS stream (unlike
// delta, where it is populated only for new explicit ACKs).
string response_nonce = 5;

// This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`
Expand Down Expand Up @@ -176,7 +177,7 @@ message DeltaDiscoveryRequest {
// When the DeltaDiscoveryRequest is a ACK or NACK message in response
// to a previous DeltaDiscoveryResponse, the response_nonce must be the
// nonce in the DeltaDiscoveryResponse.
// Otherwise response_nonce must be omitted.
// Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted.
string response_nonce = 6;

// This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`
Expand Down
6 changes: 6 additions & 0 deletions api/envoy/config/bootstrap/v2/bootstrap.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import "envoy/config/trace/v2/trace.proto";

import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";

import "validate/validate.proto";

Expand Down Expand Up @@ -148,6 +149,11 @@ message Bootstrap {
// changes to this string, especially in multi-layer Envoy deployments or deployments using
// extensions which are not upstream.
string header_prefix = 18;

// Optional proxy version which will be used to set the value of :ref:`server.version statistic
// <server_statistics>` if specified. Envoy will not process this value, it will be sent as is to
// :ref:<stats sinks <envoy_api_msg_config.metrics.v2.StatsSink>.
google.protobuf.UInt64Value stats_server_version_override = 19;
}

// Administration interface :ref:`operations documentation
Expand Down
6 changes: 6 additions & 0 deletions api/envoy/config/bootstrap/v3alpha/bootstrap.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import "envoy/config/trace/v3alpha/trace.proto";

import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";

import "validate/validate.proto";

Expand Down Expand Up @@ -144,6 +145,11 @@ message Bootstrap {
// changes to this string, especially in multi-layer Envoy deployments or deployments using
// extensions which are not upstream.
string header_prefix = 18;

// Optional proxy version which will be used to set the value of :ref:`server.version statistic
// <server_statistics>` if specified. Envoy will not process this value, it will be sent as is to
// :ref:<stats sinks <envoy_api_msg_config.metrics.v3alpha.StatsSink>.
google.protobuf.UInt64Value stats_server_version_override = 19;
}

// Administration interface :ref:`operations documentation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ message GradientControllerConfig {
// The number of requests to aggregate/sample during the minRTT recalculation window before
// updating. Defaults to 50.
google.protobuf.UInt32Value request_count = 2 [(validate.rules).uint32.gt = 0];

// Randomized time delta that will be introduced to the start of the minRTT calculation window.
// This is represented as a percentage of the interval duration. Defaults to 15%.
//
// Example: If the interval is 10s and the jitter is 15%, the next window will begin
// somewhere in the range (10s - 11.5s).
envoy.type.Percent jitter = 3;
};
MinimumRTTCalculationParams min_rtt_calc_params = 3 [(validate.rules).message.required = true];
}
Expand Down
2 changes: 2 additions & 0 deletions api/xds_protocol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,8 @@ An example minimal ``bootstrap.yaml`` fragment for ADS configuration is:
admin:
...
.. _xds_protocol_delta:

Incremental xDS
~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion bazel/dependency_imports.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@rules_foreign_cc//:workspace_definitions.bzl", "rules_foreign_cc_dependencies")
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
load("@envoy//bazel/toolchains:rbe_toolchains_config.bzl", "rbe_toolchains_config")
load("@envoy_build_tools//toolchains:rbe_toolchains_config.bzl", "rbe_toolchains_config")
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")

# go version for rules_go
Expand Down
9 changes: 0 additions & 9 deletions bazel/gen_compilation_database.sh

This file was deleted.

20 changes: 20 additions & 0 deletions bazel/protobuf.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
diff --git a/src/google/protobuf/stubs/strutil.cc b/src/google/protobuf/stubs/strutil.cc
index 3844fa6b8b..5486887295 100644
--- a/src/google/protobuf/stubs/strutil.cc
+++ b/src/google/protobuf/stubs/strutil.cc
@@ -1065,10 +1065,12 @@ char* FastUInt32ToBufferLeft(uint32 u, char* buffer) {
}

char* FastInt32ToBufferLeft(int32 i, char* buffer) {
- uint32 u = i;
+ uint32 u = 0;
if (i < 0) {
*buffer++ = '-';
- u = -i;
+ u -= i;
+ } else {
+ u = i;
}
return FastUInt32ToBufferLeft(u, buffer);
}

diff --git a/BUILD b/BUILD
index 6665de94..55f28582 100644
--- a/BUILD
Expand Down
6 changes: 4 additions & 2 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ def envoy_dependencies(skip_targets = []):
_repository_impl("com_googlesource_code_re2")
_com_google_cel_cpp()
_repository_impl("bazel_toolchains")
_repository_impl("bazel_compdb")
_repository_impl("envoy_build_tools")

_python_deps()
_cc_deps()
Expand Down Expand Up @@ -505,7 +507,7 @@ def _com_google_protobuf():
# The patch includes
# https://github.com/protocolbuffers/protobuf/pull/6333 and also uses
# foreign_cc build for zlib as its dependency.
# TODO(asraa): remove this when > protobuf 3.8.0 is released.
# TODO(asraa): remove this when protobuf 3.10 is released.
patch_args = ["-p1"],
patches = ["@envoy//bazel:protobuf.patch"],
)
Expand All @@ -519,7 +521,7 @@ def _com_google_protobuf():
# The patch includes
# https://github.com/protocolbuffers/protobuf/pull/6333 and also uses
# foreign_cc build for zlib as its dependency.
# TODO(asraa): remove this when > protobuf 3.8.0 is released.
# TODO(asraa): remove this when protobuf 3.10 is released.
patch_args = ["-p1"],
patches = ["@envoy//bazel:protobuf.patch"],
)
Expand Down
Loading

0 comments on commit 58553dc

Please sign in to comment.