Skip to content

Commit

Permalink
tools: adding some version notes alphabetization checks to check_form…
Browse files Browse the repository at this point in the history
…at (envoyproxy#10695)

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
  • Loading branch information
alyssawilk authored Apr 8, 2020
1 parent 4759d55 commit 560e7d4
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 19 deletions.
30 changes: 15 additions & 15 deletions docs/root/intro/version_history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Version history

1.14.0 (Pending)
================
* access log: added support for DOWNSTREAM_LOCAL_PORT :ref:`access log formatters <config_access_log_format>`.
* access log: access logger extensions use the "envoy.access_loggers" name space. A mapping
of extension names is available in the :ref:`deprecated <deprecated>` documentation.
* access log: added support for DOWNSTREAM_LOCAL_PORT :ref:`access log formatters <config_access_log_format>`.
* access log: fix %DOWSTREAM_DIRECT_REMOTE_ADDRESS% when used with PROXY protocol listener filter
* access log: introduce :ref:`connection-level access loggers<envoy_api_field_Listener.access_log>`.
* adaptive concurrency: fixed bug that allowed concurrency limits to drop below the configured
Expand All @@ -21,11 +21,11 @@ Version history
invokes. This effectively makes Envoy act as an egress gateway to AWS Lambda.
* aws_request_signing: a few fixes so that it works with S3.
* buffer: force copy when appending small slices to OwnedImpl buffer to avoid fragmentation.
* config: use type URL to select an extension whenever the config type URL (or its previous versions) uniquely identify a typed extension, see :ref:`extension configuration <config_overview_extension_configuration>`.
* config: added stat :ref:`update_time <config_cluster_manager_cds>`.
* config: use type URL to select an extension whenever the config type URL (or its previous versions) uniquely identify a typed extension, see :ref:`extension configuration <config_overview_extension_configuration>`.
* datasource: added retry policy for remote async data source.
* dns: the STRICT_DNS cluster now only resolves to 0 hosts if DNS resolution successfully returns 0 hosts.
* dns: added support for :ref:`dns_failure_refresh_rate <envoy_api_field_config.common.dynamic_forward_proxy.v2alpha.DnsCacheConfig.dns_failure_refresh_rate>` for the :ref:`dns cache <envoy_api_msg_config.common.dynamic_forward_proxy.v2alpha.DnsCacheConfig>` to set the DNS refresh rate during failures.
* dns: the STRICT_DNS cluster now only resolves to 0 hosts if DNS resolution successfully returns 0 hosts.
* eds: added :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.hostname>` field for endpoints and :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.HealthCheckConfig.hostname>` field for endpoint's health check config. This enables auto host rewrite and customizing the host header during health checks for eds endpoints.
* ext_authz: disabled the use of lowercase string matcher for headers matching in HTTP-based `ext_authz`.
Can be reverted temporarily by setting runtime feature `envoy.reloadable_features.ext_authz_http_service_enable_case_sensitive_string_matcher` to false.
Expand All @@ -34,15 +34,15 @@ Version history
`google.api.HttpBody <https://github.com/googleapis/googleapis/blob/master/google/api/httpbody.proto>`_.
* grpc-stats: add options to limit which messages stats are created for.
* http: added HTTP/1.1 flood protection. Can be temporarily disabled using the runtime feature `envoy.reloadable_features.http1_flood_protection`
* http: fixing a bug in HTTP/1.0 responses where Connection: keep-alive was not appended for connections which were kept alive.
* http: fixed a bug that could send extra METADATA frames and underflow memory when encoding METADATA frames on a connection that was dispatching data.
* http: connection header sanitizing has been modified to always sanitize if there is no upgrade, including when an h2c upgrade attempt has been removed.
* http: added :ref:`max_stream_duration <envoy_api_field_core.HttpProtocolOptions.max_stream_duration>` to specify the duration of existing streams. See :ref:`connection and stream timeouts <faq_configuration_timeouts>`.
* http: upgrade parser library, which removes support for "identity" transfer-encoding value.
* http: the runtime feature `http.connection_manager.log_flood_exception` is removed and replaced with a connection access log response code.
* http: added :ref:`headers_with_underscores_action setting <envoy_api_field_core.HttpProtocolOptions.headers_with_underscores_action>` to control how client requests with header names containing underscore characters are handled. The options are to allow such headers, reject request or drop headers. The default is to allow headers, preserving existing behavior.
* http: added :ref:`max_stream_duration <envoy_api_field_core.HttpProtocolOptions.max_stream_duration>` to specify the duration of existing streams. See :ref:`connection and stream timeouts <faq_configuration_timeouts>`.
* http: connection header sanitizing has been modified to always sanitize if there is no upgrade, including when an h2c upgrade attempt has been removed.
* http: fixed a bug that could send extra METADATA frames and underflow memory when encoding METADATA frames on a connection that was dispatching data.
* http: fixing a bug in HTTP/1.0 responses where Connection: keep-alive was not appended for connections which were kept alive.
* http: http filter extensions use the "envoy.filters.http" name space. A mapping
of extension names is available in the :ref:`deprecated <deprecated>` documentation.
* http: the runtime feature `http.connection_manager.log_flood_exception` is removed and replaced with a connection access log response code.
* http: upgrade parser library, which removes support for "identity" transfer-encoding value.
* listener filters: listener filter extensions use the "envoy.filters.listener" name space. A
mapping of extension names is available in the :ref:`deprecated <deprecated>` documentation.
* listeners: added :ref:`listener filter matcher api <envoy_api_field_listener.ListenerFilter.filter_disabled>` to disable individual listener filter on matching downstream connections.
Expand All @@ -52,25 +52,25 @@ Version history
* lua: added a parameter to `httpCall` that makes it possible to have the call be asynchronous.
* lua: added moonjit support.
* mongo: the stat emitted for queries without a max time set in the :ref:`MongoDB filter<config_network_filters_mongo_proxy>` was modified to emit correctly for Mongo v3.2+.
* network filters: added a :ref:`direct response filter <config_network_filters_direct_response>`.
* network filters: network filter extensions use the "envoy.filters.network" name space. A mapping
of extension names is available in the :ref:`deprecated <deprecated>` documentation.
* network filters: added a :ref:`direct response filter <config_network_filters_direct_response>`.
* rbac: added :ref:`url_path <envoy_api_field_config.rbac.v2.Permission.url_path>` for matching URL path without the query and fragment string.
* rbac: added :ref:`remote_ip <envoy_api_field_config.rbac.v2.Principal.remote_ip>` and :ref:`direct_remote_ip <envoy_api_field_config.rbac.v2.Principal.direct_remote_ip>` for matching downstream remote IP address.
* rbac: deprecated :ref:`source_ip <envoy_api_field_config.rbac.v2.Principal.source_ip>` with :ref:`direct_remote_ip <envoy_api_field_config.rbac.v2.Principal.direct_remote_ip>` and :ref:`remote_ip <envoy_api_field_config.rbac.v2.Principal.remote_ip>`.
* request_id_extension: add an ability to extend request ID handling at :ref:`HTTP connection manager<envoy_api_field_config.filter.network.http_connection_manager.v2.HttpConnectionManager.request_id_extension>`.
* retry: added a retry predicate that :ref:`rejects hosts based on metadata. <envoy_api_field_route.RetryPolicy.retry_host_predicate>`
* router: added ability to set attempt count in downstream response, see :ref:`virtual host's include response
attempt count config <envoy_api_field_route.VirtualHost.include_attempt_count_in_response>`.
* router: added additional stats for :ref:`virtual clusters <config_http_filters_router_vcluster_stats>`.
* router: added :ref:`auto_san_validation <envoy_api_field_core.UpstreamHttpProtocolOptions.auto_san_validation>` to support overrriding SAN validation to transport socket for new upstream connections based on the downstream HTTP host/authority header.
* router: added the ability to match a route based on whether a downstream TLS connection certificate has been
:ref:`validated <envoy_api_field_route.RouteMatch.TlsContextMatchOptions.validated>`.
* router: added support for :ref:`regex_rewrite
<envoy_api_field_route.RouteAction.regex_rewrite>` for path rewriting using regular expressions and capture groups.
* router: added support for DOWNSTREAM_LOCAL_PORT :ref:`header formatter <config_http_conn_man_headers_custom_request_headers>`.
* router: don't ignore :ref:`per_try_timeout <envoy_api_field_route.RetryPolicy.per_try_timeout>` when the :ref:`global route timeout <envoy_api_field_route.RouteAction.timeout>` is disabled.
* router: added ability to set attempt count in downstream response, see :ref:`virtual host's include response
attempt count config <envoy_api_field_route.VirtualHost.include_attempt_count_in_response>`.
* router: strip whitespace for :ref:`retry_on <envoy_api_field_route.RetryPolicy.retry_on>`, :ref:`grpc-retry-on header <config_http_filters_router_x-envoy-retry-grpc-on>` and :ref:`retry-on header <config_http_filters_router_x-envoy-retry-on>`.
* router: added support for DOWNSTREAM_LOCAL_PORT :ref:`header formatter <config_http_conn_man_headers_custom_request_headers>`.
* runtime: enabling the runtime feature "envoy.deprecated_features.allow_deprecated_extension_names"
disables the use of deprecated extension names.
* runtime: integer values may now be parsed as booleans.
Expand All @@ -82,10 +82,11 @@ Version history
names is available in the :ref:`deprecated <deprecated>` documentation.
* thrift_proxy: add router filter stats to docs.
* tls: added configuration to disable stateless TLS session resumption :ref:`disable_stateless_session_resumption <envoy_api_field_auth.DownstreamTlsContext.disable_stateless_session_resumption>`
* tracing: added gRPC service configuration to the OpenCensus Stackdriver and OpenCensus Agent tracers.
* tracing: tracer extensions use the "envoy.tracers" name space. A mapping of extension names is
available in the :ref:`deprecated <deprecated>` documentation.
* tracing: added gRPC service configuration to the OpenCensus Stackdriver and OpenCensus Agent tracers.
* upstream: added ``upstream_rq_retry_limit_exceeded`` to :ref:`cluster <config_cluster_manager_cluster_stats>`, and :ref:`virtual cluster <config_http_filters_router_vcluster_stats>` stats.
* upstream: changed load distribution algorithm when all priorities enter :ref:`panic mode<arch_overview_load_balancing_panic_threshold>`.
* upstream: combined HTTP/1 and HTTP/2 connection pool code. This means that circuit breaker
limits for both requests and connections apply to both pool types. Also, HTTP/2 now has
the option to limit concurrent requests on a connection, and allow multiple draining
Expand All @@ -94,7 +95,6 @@ Version history
"envoy.reloadable_features.new_http2_connection_pool_behavior" and then re-configure your clusters or
restart Envoy. The behavior will not switch until the connection pools are recreated. The new
circuit breaker behavior is described :ref:`here <arch_overview_circuit_break>`.
* upstream: changed load distribution algorithm when all priorities enter :ref:`panic mode<arch_overview_load_balancing_panic_threshold>`.
* zlib: by default zlib is initialized to use its default strategy (Z_DEFAULT_STRATEGY)
instead of the fixed one (Z_FIXED). The difference is that the use of dynammic
Huffman codes is enabled now resulting in better compression ratio for normal data.
Expand Down
27 changes: 23 additions & 4 deletions tools/code_format/check_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,15 @@ def hasInvalidAngleBracketDirectory(line):
return subdir in SUBDIR_SET


VERSION_HISTORY_NEW_LINE_REGEX = re.compile("\* [a-z \-_]*: [a-z:`]")
VERSION_HISTORY_NEW_LINE_REGEX = re.compile("\* ([a-z \-_]*): ([a-z:`]+)")
VERSION_HISTORY_NEW_RELEASE_REGEX = re.compile("^====[=]+$")


def checkCurrentReleaseNotes(file_path, error_messages):
in_current_release = False

first_word_of_prior_line = ''
next_word_to_check = '' # first word after :
for line_number, line in enumerate(readLines(file_path)):

def reportError(message):
Expand All @@ -415,9 +417,26 @@ def reportError(message):
# If we see a version marker we are now in the section for the current release.
in_current_release = True

if line.startswith("*") and not VERSION_HISTORY_NEW_LINE_REGEX.match(line):
reportError("Version history line malformed. "
"Does not match VERSION_HISTORY_NEW_LINE_REGEX in check_format.py\n %s" % line)
# Do basic alphabetization checks of the first word on the line and the
# first word after the :
if line.startswith("*"):
match = VERSION_HISTORY_NEW_LINE_REGEX.match(line)
if not match:
reportError("Version history line malformed. "
"Does not match VERSION_HISTORY_NEW_LINE_REGEX in check_format.py\n %s" % line)
else:
first_word = match.groups()[0]
next_word = match.groups()[1]
if first_word_of_prior_line and first_word_of_prior_line > first_word:
reportError(
"Version history not in alphabetical order (%s vs %s): please check placement of line\n %s. "
% (first_word_of_prior_line, first_word, line))
if first_word_of_prior_line == first_word and next_word_to_check and next_word_to_check > next_word:
reportError(
"Version history not in alphabetical order (%s vs %s): please check placement of line\n %s. "
% (next_word_to_check, next_word, line))
first_word_of_prior_line = first_word
next_word_to_check = next_word


def checkFileContents(file_path, checker):
Expand Down

0 comments on commit 560e7d4

Please sign in to comment.