Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto-merge envoyproxy/envoy[main] into envoyproxy/envoy-openssl[main] #257

Merged
merged 41 commits into from
Sep 30, 2024

Conversation

update-openssl-envoy[bot]
Copy link

Generated by envoy-sync-receive.sh

Description:
Adding new code owner for ext_proc filter

Risk Level: low
Testing: N/A
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Yanjun Xiang <[email protected]>
Risk Level: low
Testing: updated tests
Docs Changes: n/a
Release Notes: n/a
envoyproxy/envoy-mobile#176

Signed-off-by: Alyssa Wilk <[email protected]>
It's UB to specialize `std::ostream`'s `operator<<` on `std::vector` and
`std::pair`.

Replace uses of it in tests with GoogleTest's
`::testing::PrintToString()`

While we're at it, remove an unnecessariy opening of namespace std for
specializing `std::hash` on `Envoy::HashedValue`. This is okay, but we
can do it without opening the namespace.

Signed-off-by: Alejandro R. Sedeño <[email protected]>
Commit Message: opentelemetrytracer: avoid exporting when there are no
spans
Additional Description: Today, the OpenTelemetry tracer exports a OTLP
request on each interval, even when there are no spans to be sent. The
OTLP is empty, only containing the resource (and its attributes).
Risk Level: Low
Testing: Manual
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #35997] 
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional [API
Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

Signed-off-by: Joao Grassi <[email protected]>
Commit Message:

- Add `ClientSideWeightedRoundRobinLoadBalancer`.
  - Attach `ClientSideHostLbPolicyData` to each `Host`.
- Add `OrcaLoadReportCallbacks` callback to each `LoadBalancerContext`.
- Calculate weights in `Host::ClientSideHostLbPolicyData` based on
OrcaLoadReport.
- Periodically update `Host::weight` for load balancing using calculated
weights.
- Add `host` reference to `OrcaLoadReportCallbacks::onOrcaLoadReport`
callback.

Risk Level: low
Testing: `bazel test
//test/extensions/load_balancing_policies/client_side_weighted_round_robin/...`
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

#34777

---------

Signed-off-by: Misha Efimov <[email protected]>
without build on m1 return with following error:

```console
ERROR: /private/var/tmp/_bazel_zirain/c9b2d3f5dca31997d353206ef73d3b4e/external/envoy/contrib/postgres_proxy/filters/network/source/BUILD:17:17: Compiling contrib/postgres_proxy/filters/network/source/postgres_filter.cc failed: (Exit 1): wrapped_clang_pp failed: error executing command (from target @envoy//contrib/postgres_proxy/filters/network/source:filter) external/local_config_cc/wrapped_clang_pp '-D_FORTIFY_SOURCE=1' -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -O0 -DDEBUG '-std=c++11' ... (remaining 205 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
external/envoy/contrib/postgres_proxy/filters/network/source/postgres_filter.cc:217:12: error: implicit capture of 'this' with a capture default of '=' is deprecated [-Werror,-Wdeprecated-this-capture]
  217 |       if (!read_callbacks_->connection().startSecureTransport()) {
      |            ^
external/envoy/contrib/postgres_proxy/filters/network/source/postgres_filter.cc:214:55: note: add an explicit capture of 'this' to capture '*this' by reference
  214 |   read_callbacks_->connection().addBytesSentCallback([=](uint64_t bytes) -> bool {
      |                                                       ^
      |                                                        , this
1 error generated.
```

Signed-off-by: zirain <[email protected]>
…130c09` in /ci (#36322)


Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…cution context (#36277)

Commit Message: execution context: refactored the impl to use marco to
enable the execution context
Additional Description:

The execution context is a feature that was contributed by the @wu-bin
from google. But it only makes sense in very limited scenarios.
After a discussion with @wu-bin , we decided to refactor it to make it
more 'independent'.

This PR refactored the implementation to make the custom abstraction
`ExecutionContext` only be referenced in limited positions of Envoy core
code base. More specifically, this PR:

1. move all ExecutionContext related code to single header file
`envoy/common/execution_conetxt.h`.
2. No any directly dependency to the ExecutionContext at the Envoy core
code base except the `source/common/common/scope_tracker.h`.
3. compiled the ExecutionContext out by default.
4. removed restart feature flag
`envoy.restart_features.enable_execution_context`.
 
Risk Level: low.
Testing: unit.
Docs Changes: n/a.
Release Notes: added.
Platform Specific Features: n/a.

---------

Signed-off-by: wangbaiping <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…36173)

<!--
!!!ATTENTION!!!

If you are fixing *any* crash or *any* potential security issue, *do
not*
open a pull request in this repo. Please report the issue via emailing
[email protected] where the issue will be triaged
appropriately.
Thank you in advance for helping to keep Envoy secure.

!!!ATTENTION!!!

For an explanation of how to fill out the fields, please see the
relevant section
in
[PULL_REQUESTS.md](https://github.com/envoyproxy/envoy/blob/main/PULL_REQUESTS.md)
-->

Commit Message: Set status code base on GRPC status code for
OpenTelemetry tracers
Additional Description: related to
istio/istio#53025
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional [API
Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

---------

Signed-off-by: zirain <[email protected]>
Signed-off-by: spacewander <[email protected]>

<!--
!!!ATTENTION!!!

If you are fixing *any* crash or *any* potential security issue, *do
not*
open a pull request in this repo. Please report the issue via emailing
[email protected] where the issue will be triaged
appropriately.
Thank you in advance for helping to keep Envoy secure.

!!!ATTENTION!!!

For an explanation of how to fill out the fields, please see the
relevant section
in
[PULL_REQUESTS.md](https://github.com/envoyproxy/envoy/blob/main/PULL_REQUESTS.md)
-->

Commit Message: contrib: switch the minimal go version to a more stable
version
Additional Description:
It's too risky to use a version which is just released for a month as
the minimal Go version requirement. That previous change hurts the
adoption of Envoy Golang filter as it forced users to use the latest
version as the minimal required version.
Risk Level: Low
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
Fixes #36246
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional [API
Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]
Commit Message: minor optimization to the upstream host code
Additional Description:

1. unique_ptr over shared_ptr by default.
2. OptRef rather than reference of smart pointer.
3. fix style.

Risk Level: low.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.

---------

Signed-off-by: wangbaiping <[email protected]>
Commit Message: access log: new 20x faster json formatter implementation
Additional Description:

### The core idea of the new `JsonFormatter`.

The core idea of the new `JsonFormatter` is to do as much as possible
work when loading configuration. Given a specific `json_format`:

```
   json_format:
     text: "text"
     template: "%START_TIME%"
     number: 2
     bool: true
     list:
       - "list_raw_value"
       - false
       - "%EMIT_TIME%"
     nested:
       text: "nested_text"
```

When loading configuration, the keys, raw values, delimiters (all parts
don't contains the substitution format commands) will be sanitized and
serialized as JSON string pieces (raw JSON strings) directly.
The strings that contain substitution commands will be extracted as
template string and parsed as substitution formatters (objects that
could extract dynamic values from request/response/stream info, etc.).
Finally, the whole proto struct configuration we be parsed to an array
of raw JSON piece strings and formatters.

Basically, above configuration finally will be parsed and serialized to
following pieces and formatters:

```
- '{"text":"text","tmpl":'                                       # Element 0, raw JSON piece.
- '%START_TIME% %FLAG%'                                          # Element 1, formatter string, must be independent element.
- ',"number":2,"bool":true,"list":["list_raw_value",false,'      # Element 2, raw JSON piece.
- '%EMIT_TIME%'                                                  # Element 3, formatter string, must be independent element.
- '],"nested":{"text":"nested_text"}}'                           # Element 4, raw JSON piece.
```

Then, at runtime, when a request is complete and the caller want to
construct a log line. The above element array will be iterated in order.
The raw JSON piece string will be put into output buffer directly. And
the formatters will be evaluated. The outputs of formatters will be
sanitized/serialized to legal JSON values and then be put into output
buffer.

At the runtime (core data paths), the logic of new JsonFormatter is
almost same with the text formatter. By this way, the JsonFormatter
could get comparable/same performance with the text formatter.

### The performance result of the formatter.

The previous json formatter is too too slow and the new one perform much
better (16x-26x faster).

```
-------------------------------------------------------------------------------
Benchmark                                     Time             CPU   Iterations
-------------------------------------------------------------------------------
BM_AccessLogFormatterSetup                 7020 ns         7020 ns        96714
BM_AccessLogFormatter                       349 ns          349 ns      2008804
BM_StructAccessLogFormatter                5837 ns         5837 ns       117163
BM_TypedStructAccessLogFormatter           4883 ns         4883 ns       148206
BM_LegacyJsonAccessLogFormatter           10460 ns        10460 ns        68180
BM_LegacyTypedJsonAccessLogFormatter       9541 ns         9541 ns        73877
BM_JsonAccessLogFormatter                   460 ns          460 ns      1521227.  <-- here
BM_FormatterCommandParsing                 35.6 ns         35.6 ns     18557843


```


Risk Level: low. guard by the runtime flag.
Testing: unit.
Docs Changes: n/a.
Release Notes: added.
Platform Specific Features: n/a.

---------

Signed-off-by: wangbaiping <[email protected]>
…ve log under runtime guard (#36308)

Signed-off-by: Boteng Yao <[email protected]>
Risk Level: low
Testing: updated tests
Docs Changes: n/a
Release Notes: n/a
envoyproxy/envoy-mobile#176

Signed-off-by: Alyssa Wilk <[email protected]>
This serves to decouple protoconverter from the protobuf version it was
forked off of.

These changes should really be upstream, but upstream is experiencing
technical issues taking patches right now, so we'll carry them here
until those are resolved.

Risk Level: low
Testing: CI

---------

Signed-off-by: Alejandro R. Sedeño <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
botengyao and others added 2 commits September 27, 2024 13:28
…build (#36337)

I’ve been explored other solutions to
envoyproxy/envoy#24164 (comment)
over the past few days, and here is the final fix, and I think we don't
need rust coverage as whole at current stage.

Commit Message: re-enable envoy wasm coverage build by disabling rust
coverage build
Additional Description:
Risk Level: no
Fix:  #24164
Testing:
Docs Changes:

---------

Signed-off-by: Boteng Yao <[email protected]>
* upstream/main: (40 commits)
  wasm: re-enable envoy wasm coverage build by disabling rust coverage build (#36337)
  build(deps): bump yarl from 1.12.1 to 1.13.0 in /tools/base (#36360)
  Update protoconverter patch (#36290)
  original_ip: removing exceptions (#36311)
  internal_address: mention the explicit_internal_address_config and move log under runtime guard (#36308)
  access log: new 20x faster json formatter implementation (#35545)
  minor optimization to the upstream host code (#36347)
  ci: Bubble coverage errors (#36358)
  router: Add deferred reset error details (#36294)
  contrib: switch the minimal go version to a more stable version (#36263)
  Set status code base on GRPC status code for OpenTelemetry tracers (#36173)
  build(deps): bump actions/checkout from 4.1.7 to 4.2.0 (#36343)
  execution context: refactored the impl to use marco to enable the execution context (#36277)
  Ext_proc: Enable sending body without waiting for header response in STREAMED mode (#35850)
  Ext_proc refactoring: Move stream object from Filter class to client  (#36228)
  cel: add response.backend_latency in CEL attributes (#36292)
  http: add config for max response header size (#36231)
  ci: Boost arm build machines (#36339)
  ci: Fix workaround (#36336)
  ci: Workaround issue where PRs are not triggering tertiary workflows (#36335)
  ...
@tedjpoole tedjpoole merged commit cd50f2d into main Sep 30, 2024
4 checks passed
@tedjpoole tedjpoole deleted the auto-merge-main branch September 30, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.