Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions docs/root/version_history/current.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Minor Behavior Changes
can be reverted by setting runtime guard ``correct_scheme_and_xfp`` to false.
* http: set the default :ref:`lazy headermap threshold <arch_overview_http_header_map_settings>` to 3,
which defines the minimal number of headers in a request/response/trailers required for using a
dictionary in addition to the list. Setting the `envoy.http.headermap.lazy_map_min_size` runtime
dictionary in addition to the list. Setting the ``envoy.http.headermap.lazy_map_min_size`` runtime
feature to a non-negative number will override the default value.
* listener: added the :ref:`enable_reuse_port <envoy_v3_api_field_config.listener.v3.Listener.enable_reuse_port>`
field and changed the default for reuse_port from false to true, as the feature is now well
supported on the majority of production Linux kernels in use. The default change is aware of hot
restart, as otherwise the change would not be backwards compatible between restarts. This means
that hot restarting on to a new binary will retain the default of false until the binary undergoes
a full restart. To retain the previous behavior, either explicitly set the new configuration
field to false, or set the runtime feature flag `envoy.reloadable_features.listener_reuse_port_default_enabled`
field to false, or set the runtime feature flag ``envoy.reloadable_features.listener_reuse_port_default_enabled``
to false. As part of this change, the use of reuse_port for TCP listeners on both macOS and
Windows has been disabled due to suboptimal behavior. See the field documentation for more
information.
Expand All @@ -38,6 +38,7 @@ Bug Fixes
---------
*Changes expected to improve the state of the world and are unlikely to have negative effects*

* access log: fix ``%UPSTREAM_CLUSTER%`` when used in http upstream access logs. Previously, it was always logging as an unset value.
* access log: fix `%UPSTREAM_CLUSTER%` when used in http upstream access logs. Previously, it was always logging as an unset value.
* aws request signer: fix the AWS Request Signer extension to correctly normalize the path and query string to be signed according to AWS' guidelines, so that the hash on the server side matches. See `AWS SigV4 documentaion <https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html>`_.
* cluster: delete pools when they're idle to fix unbounded memory use when using PROXY protocol upstream with tcp_proxy. This behavior can be temporarily reverted by setting the ``envoy.reloadable_features.conn_pool_delete_when_idle`` runtime guard to false.
Expand Down
11 changes: 11 additions & 0 deletions tools/docs/rst_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
RELOADABLE_FLAG_REGEX = re.compile(r".*(...)(envoy.reloadable_features.[^ ]*)\s.*")
VERSION_HISTORY_NEW_LINE_REGEX = re.compile(r"\* ([a-z \-_]+): ([a-z:`]+)")
VERSION_HISTORY_SECTION_NAME = re.compile(r"^[A-Z][A-Za-z ]*$")
# Make sure backticks come in pairs.
# Exceptions: reflinks (ref:`` where the backtick won't be preceded by a space
# links `title <link>`_ where the _ is checked for in the regex.
BAD_TICKS_REGEX = re.compile(r".* `[^`].*`[^_]")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im wondering will this work across lines ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should - AFIK the rst script collects a line's worth of data in line and only then does checks like "does this release note have a terminal period"

It will miss things like (header name) so it's still best effort but IMO better than nothing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, for sure

the reason i hadnt added this previously is that a line regex wont catch situations like

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas nec porttitor tellus, commodo tincidunt elit. ``Nullam
auctor neque`` pulvinar ipsum congue, a lacinia nulla sagittis.

which i think is valid rst etc

my vague intention on this was to add a sphinx plugin that hooked in to the "default role" (i think that is what its called in rstspeak) and errored

but, yep, this should catch most i think



class CurrentVersionFile(object):
Expand Down Expand Up @@ -43,8 +47,15 @@ def check_flags(self, line: str) -> list:
return ([f"Flag {flag_match.groups()[1]} should be enclosed in double back ticks"]
if flag_match and not flag_match.groups()[0].startswith(' ``') else [])

def check_ticks(self, line: str) -> list:
ticks_match = BAD_TICKS_REGEX.match(line)
return ([f"Backticks should come in pairs (except for links and reflinks): {line}"]
if ticks_match else [])

def check_line(self, line: str) -> list:
errors = self.check_reflink(line) + self.check_flags(line)
if RELOADABLE_FLAG_REGEX.match(line):
errors += self.check_ticks(line)
if line.startswith("* "):
errors += self.check_list_item(line)
elif not line:
Expand Down