Skip to content

deps: Bump protobuf and grpc#42435

Merged
yanavlasov merged 2 commits into
envoyproxy:mainfrom
jwendell:bump-protobuf2
Dec 10, 2025
Merged

deps: Bump protobuf and grpc#42435
yanavlasov merged 2 commits into
envoyproxy:mainfrom
jwendell:bump-protobuf2

Conversation

@jwendell
Copy link
Copy Markdown
Member

@jwendell jwendell commented Dec 5, 2025

No description provided.

Signed-off-by: Jonh Wendell <jwendell@redhat.com>
@repokitteh-read-only repokitteh-read-only Bot added the deps Approval required for changes to Envoy's external dependencies label Dec 5, 2025
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).
envoyproxy/dependency-shepherds assignee is @agrawroh

🐱

Caused by: #42435 was opened by jwendell.

see: more, trace.

Copy link
Copy Markdown
Contributor

@yanavlasov yanavlasov left a comment

Choose a reason for hiding this comment

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

/wait-any

# Following attribute will be enabled once the filter is registered.
# extension_names = ["envoy.filters.http.proto_api_scrubber"],
rbe_pool = "6gig",
# FIXME This test is failing with newer protobuf
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you know the cause of failure? I want to make sure we are not breaking this filter.

@sumitkmr2 @pranavrautgoogle can you help diagnosing the test failure with the new protobuf, please?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I've pushed a fix to this test and removed the FIXME.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Apologies, I was on leave. The fix looks good to me, thanks @jwendell for the fix!

}

- if (in_->BytesAvailable() < static_cast<pb::int64>(current_message_size_)) {
+ if (in_->BytesAvailable() < static_cast<int64_t>(current_message_size_)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@TAOXUY @nareddyt would it be possible to make this change in the grpc_httpjson_transcoding repo, please?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, I can go ahead and make this PR upstream today

@yanavlasov
Copy link
Copy Markdown
Contributor

/wait-any

Protobuf 33.1 changed DebugString() to produce unparseable output
(random prefixes, whitespace) for security reasons. The test was
using DebugString() to serialize a matcher proto then parsing it
with TextFormat::ParseFromString(), which now fails silently.

Replace DebugString() with TextFormat::PrintToString() which
produces proper text proto format.

Signed-off-by: Jonh Wendell <jwendell@redhat.com>
@jwendell
Copy link
Copy Markdown
Member Author

jwendell commented Dec 9, 2025

ping @envoyproxy/envoy-maintainers

@phlax
Copy link
Copy Markdown
Member

phlax commented Dec 9, 2025

@yanavlasov i think this waiting for further review

Copy link
Copy Markdown
Member

@agrawroh agrawroh left a comment

Choose a reason for hiding this comment

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

It looks good to me. I'm okay taking a patch in grpc_httpjson_transcoding until it gets upstreamed (we can have a tracking ticket).

Will let @yanavlasov give a final approval.

@repokitteh-read-only repokitteh-read-only Bot removed the deps Approval required for changes to Envoy's external dependencies label Dec 9, 2025
@yanavlasov yanavlasov merged commit 863fbc7 into envoyproxy:main Dec 10, 2025
30 checks passed
dinesh-murugiah pushed a commit to dinesh-murugiah/envoy-redisproxy-improvements that referenced this pull request Dec 19, 2025
Signed-off-by: Jonh Wendell <jwendell@redhat.com>
Signed-off-by: dinesh-murugiah <dinesh.murugiah@freshworks.com>
wbpcode pushed a commit that referenced this pull request Mar 2, 2026
…37 behavior under Protobuf 30+) (#43508)

Commit Message:

Envoy 1.37.0 updated protobuf from 29.3 to 33.2. That dependency change
altered debug-string output semantics and broke behavior that worked in
1.36.x for ext_proc consumers parsing `xds.virtual_host_metadata`.

This behavior change was introduced in #42435 and #42827.

This PR switches message serialization from debug-string APIs to
protobuf text-format APIs so message-valued CEL attributes are
machine-parseable again, as recommended by protobuf programming guides.
https://protobuf.dev/programming-guides/deserialize-debug

 **What broke in 1.37.0**

- In both 1.36.x and 1.37.0, message-valued CEL results were stringified
via ShortDebugString().
  - In 1.36.x (protobuf 29.3), that output was parseable.
- In 1.37.0 (protobuf 33.2), debug strings are now prefixed with
`goo.gle/debugonly` / `goo.gle/debugstr`, which is intentionally
non-parseable as textproto.
- Result: ext_proc implementations that parse
`xds.virtual_host_metadata` as textproto started failing after upgrading
to 1.37.0.
  
**Note**: xds metadata attributes in ext_proc requests are **not
diagnostic log fields**; they are machine-to-machine payload data
consumed by external processors. External processors parse these values
to make policy and routing decisions, so serialization must be stable
and machine-readable by standard protobuf tooling. `DebugString` is a
diagnostic format with no compatibility contract, and in protobuf 30+ it
may include `goo.gle/debug...` prefixes that intentionally break
parsing. For this path, protobuf `TextFormat` is the correct format, not
debug serialization.


**Example**

  Given virtual host metadata:

```yaml
  {
    "metadata": {
      "filterMetadata": {
        "envoy-gateway": {
          "resources": [
            {
              "kind": "Gateway",
              "name": "eg",
              "namespace": "default",
              "sectionName": "http"
            }
          ]
        }
      }
    }
  }
 ```

  Before (1.37.0 + protobuf 30+ path), ext_proc may receive:

`goo.gle/debugonly  filter_metadata { key: "envoy-gateway" value { ... } }`

  Parsing fails at token 1.

  After this PR:

`filter_metadata { key: "envoy-gateway" value { ... } }`

This is protobuf text format and parses via TextFormat::ParseFromString(...).

**Compatibility notes**

  - This restores 1.36.x-like effective behavior for ext_proc users (parseable metadata strings), while using the correct serialization API.
  - Minor formatting differences vs 1.36.x debug output are possible (whitespace/order), but output is now stable machine-readable textproto.
  - Scope includes other call sites using Expr::print(...) for message-valued CEL results (for example rate-limit descriptor CEL stringification).
  
Additional Description:
Risk Level: low
Testing: unit and integration test
Docs Changes:
Release Notes: yes
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #43466]
[Optional Deprecated:]
[Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

---------

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
zhaohuabing added a commit to zhaohuabing/envoy that referenced this pull request Mar 2, 2026
…37 behavior under Protobuf 30+) (envoyproxy#43508)

Commit Message:

Envoy 1.37.0 updated protobuf from 29.3 to 33.2. That dependency change
altered debug-string output semantics and broke behavior that worked in
1.36.x for ext_proc consumers parsing `xds.virtual_host_metadata`.

This behavior change was introduced in envoyproxy#42435 and envoyproxy#42827.

This PR switches message serialization from debug-string APIs to
protobuf text-format APIs so message-valued CEL attributes are
machine-parseable again, as recommended by protobuf programming guides.
https://protobuf.dev/programming-guides/deserialize-debug

 **What broke in 1.37.0**

- In both 1.36.x and 1.37.0, message-valued CEL results were stringified
via ShortDebugString().
  - In 1.36.x (protobuf 29.3), that output was parseable.
- In 1.37.0 (protobuf 33.2), debug strings are now prefixed with
`goo.gle/debugonly` / `goo.gle/debugstr`, which is intentionally
non-parseable as textproto.
- Result: ext_proc implementations that parse
`xds.virtual_host_metadata` as textproto started failing after upgrading
to 1.37.0.

**Note**: xds metadata attributes in ext_proc requests are **not
diagnostic log fields**; they are machine-to-machine payload data
consumed by external processors. External processors parse these values
to make policy and routing decisions, so serialization must be stable
and machine-readable by standard protobuf tooling. `DebugString` is a
diagnostic format with no compatibility contract, and in protobuf 30+ it
may include `goo.gle/debug...` prefixes that intentionally break
parsing. For this path, protobuf `TextFormat` is the correct format, not
debug serialization.

**Example**

  Given virtual host metadata:

```yaml
  {
    "metadata": {
      "filterMetadata": {
        "envoy-gateway": {
          "resources": [
            {
              "kind": "Gateway",
              "name": "eg",
              "namespace": "default",
              "sectionName": "http"
            }
          ]
        }
      }
    }
  }
 ```

  Before (1.37.0 + protobuf 30+ path), ext_proc may receive:

`goo.gle/debugonly  filter_metadata { key: "envoy-gateway" value { ... } }`

  Parsing fails at token 1.

  After this PR:

`filter_metadata { key: "envoy-gateway" value { ... } }`

This is protobuf text format and parses via TextFormat::ParseFromString(...).

**Compatibility notes**

  - This restores 1.36.x-like effective behavior for ext_proc users (parseable metadata strings), while using the correct serialization API.
  - Minor formatting differences vs 1.36.x debug output are possible (whitespace/order), but output is now stable machine-readable textproto.
  - Scope includes other call sites using Expr::print(...) for message-valued CEL results (for example rate-limit descriptor CEL stringification).

Additional Description:
Risk Level: low
Testing: unit and integration test
Docs Changes:
Release Notes: yes
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit envoyproxy#43466]
[Optional Deprecated:]
[Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

---------

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
(cherry picked from commit 697e419)
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
phlax pushed a commit that referenced this pull request Mar 2, 2026
…37 behavior under Protobuf 30+) (#43508)

Commit Message:

Envoy 1.37.0 updated protobuf from 29.3 to 33.2. That dependency change
altered debug-string output semantics and broke behavior that worked in
1.36.x for ext_proc consumers parsing `xds.virtual_host_metadata`.

This behavior change was introduced in #42435 and #42827.

This PR switches message serialization from debug-string APIs to
protobuf text-format APIs so message-valued CEL attributes are
machine-parseable again, as recommended by protobuf programming guides.
https://protobuf.dev/programming-guides/deserialize-debug

 **What broke in 1.37.0**

- In both 1.36.x and 1.37.0, message-valued CEL results were stringified
via ShortDebugString().
  - In 1.36.x (protobuf 29.3), that output was parseable.
- In 1.37.0 (protobuf 33.2), debug strings are now prefixed with
`goo.gle/debugonly` / `goo.gle/debugstr`, which is intentionally
non-parseable as textproto.
- Result: ext_proc implementations that parse
`xds.virtual_host_metadata` as textproto started failing after upgrading
to 1.37.0.

**Note**: xds metadata attributes in ext_proc requests are **not
diagnostic log fields**; they are machine-to-machine payload data
consumed by external processors. External processors parse these values
to make policy and routing decisions, so serialization must be stable
and machine-readable by standard protobuf tooling. `DebugString` is a
diagnostic format with no compatibility contract, and in protobuf 30+ it
may include `goo.gle/debug...` prefixes that intentionally break
parsing. For this path, protobuf `TextFormat` is the correct format, not
debug serialization.

**Example**

  Given virtual host metadata:

```yaml
  {
    "metadata": {
      "filterMetadata": {
        "envoy-gateway": {
          "resources": [
            {
              "kind": "Gateway",
              "name": "eg",
              "namespace": "default",
              "sectionName": "http"
            }
          ]
        }
      }
    }
  }
 ```

  Before (1.37.0 + protobuf 30+ path), ext_proc may receive:

`goo.gle/debugonly  filter_metadata { key: "envoy-gateway" value { ... } }`

  Parsing fails at token 1.

  After this PR:

`filter_metadata { key: "envoy-gateway" value { ... } }`

This is protobuf text format and parses via TextFormat::ParseFromString(...).

**Compatibility notes**

  - This restores 1.36.x-like effective behavior for ext_proc users (parseable metadata strings), while using the correct serialization API.
  - Minor formatting differences vs 1.36.x debug output are possible (whitespace/order), but output is now stable machine-readable textproto.
  - Scope includes other call sites using Expr::print(...) for message-valued CEL results (for example rate-limit descriptor CEL stringification).

Additional Description:
Risk Level: low
Testing: unit and integration test
Docs Changes:
Release Notes: yes
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #43466]
[Optional Deprecated:]
[Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

---------

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
(cherry picked from commit 697e419)
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
bmjask pushed a commit to bmjask/envoy that referenced this pull request Mar 14, 2026
…37 behavior under Protobuf 30+) (envoyproxy#43508)

Commit Message:

Envoy 1.37.0 updated protobuf from 29.3 to 33.2. That dependency change
altered debug-string output semantics and broke behavior that worked in
1.36.x for ext_proc consumers parsing `xds.virtual_host_metadata`.

This behavior change was introduced in envoyproxy#42435 and envoyproxy#42827.

This PR switches message serialization from debug-string APIs to
protobuf text-format APIs so message-valued CEL attributes are
machine-parseable again, as recommended by protobuf programming guides.
https://protobuf.dev/programming-guides/deserialize-debug

 **What broke in 1.37.0**

- In both 1.36.x and 1.37.0, message-valued CEL results were stringified
via ShortDebugString().
  - In 1.36.x (protobuf 29.3), that output was parseable.
- In 1.37.0 (protobuf 33.2), debug strings are now prefixed with
`goo.gle/debugonly` / `goo.gle/debugstr`, which is intentionally
non-parseable as textproto.
- Result: ext_proc implementations that parse
`xds.virtual_host_metadata` as textproto started failing after upgrading
to 1.37.0.

**Note**: xds metadata attributes in ext_proc requests are **not
diagnostic log fields**; they are machine-to-machine payload data
consumed by external processors. External processors parse these values
to make policy and routing decisions, so serialization must be stable
and machine-readable by standard protobuf tooling. `DebugString` is a
diagnostic format with no compatibility contract, and in protobuf 30+ it
may include `goo.gle/debug...` prefixes that intentionally break
parsing. For this path, protobuf `TextFormat` is the correct format, not
debug serialization.

**Example**

  Given virtual host metadata:

```yaml
  {
    "metadata": {
      "filterMetadata": {
        "envoy-gateway": {
          "resources": [
            {
              "kind": "Gateway",
              "name": "eg",
              "namespace": "default",
              "sectionName": "http"
            }
          ]
        }
      }
    }
  }
 ```

  Before (1.37.0 + protobuf 30+ path), ext_proc may receive:

`goo.gle/debugonly  filter_metadata { key: "envoy-gateway" value { ... } }`

  Parsing fails at token 1.

  After this PR:

`filter_metadata { key: "envoy-gateway" value { ... } }`

This is protobuf text format and parses via TextFormat::ParseFromString(...).

**Compatibility notes**

  - This restores 1.36.x-like effective behavior for ext_proc users (parseable metadata strings), while using the correct serialization API.
  - Minor formatting differences vs 1.36.x debug output are possible (whitespace/order), but output is now stable machine-readable textproto.
  - Scope includes other call sites using Expr::print(...) for message-valued CEL results (for example rate-limit descriptor CEL stringification).

Additional Description:
Risk Level: low
Testing: unit and integration test
Docs Changes:
Release Notes: yes
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit envoyproxy#43466]
[Optional Deprecated:]
[Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

---------

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: bjmask <11672696+bjmask@users.noreply.github.com>
bvandewalle pushed a commit to bvandewalle/envoy that referenced this pull request Mar 17, 2026
…37 behavior under Protobuf 30+) (envoyproxy#43508)

Commit Message:

Envoy 1.37.0 updated protobuf from 29.3 to 33.2. That dependency change
altered debug-string output semantics and broke behavior that worked in
1.36.x for ext_proc consumers parsing `xds.virtual_host_metadata`.

This behavior change was introduced in envoyproxy#42435 and envoyproxy#42827.

This PR switches message serialization from debug-string APIs to
protobuf text-format APIs so message-valued CEL attributes are
machine-parseable again, as recommended by protobuf programming guides.
https://protobuf.dev/programming-guides/deserialize-debug

 **What broke in 1.37.0**

- In both 1.36.x and 1.37.0, message-valued CEL results were stringified
via ShortDebugString().
  - In 1.36.x (protobuf 29.3), that output was parseable.
- In 1.37.0 (protobuf 33.2), debug strings are now prefixed with
`goo.gle/debugonly` / `goo.gle/debugstr`, which is intentionally
non-parseable as textproto.
- Result: ext_proc implementations that parse
`xds.virtual_host_metadata` as textproto started failing after upgrading
to 1.37.0.
  
**Note**: xds metadata attributes in ext_proc requests are **not
diagnostic log fields**; they are machine-to-machine payload data
consumed by external processors. External processors parse these values
to make policy and routing decisions, so serialization must be stable
and machine-readable by standard protobuf tooling. `DebugString` is a
diagnostic format with no compatibility contract, and in protobuf 30+ it
may include `goo.gle/debug...` prefixes that intentionally break
parsing. For this path, protobuf `TextFormat` is the correct format, not
debug serialization.


**Example**

  Given virtual host metadata:

```yaml
  {
    "metadata": {
      "filterMetadata": {
        "envoy-gateway": {
          "resources": [
            {
              "kind": "Gateway",
              "name": "eg",
              "namespace": "default",
              "sectionName": "http"
            }
          ]
        }
      }
    }
  }
 ```

  Before (1.37.0 + protobuf 30+ path), ext_proc may receive:

`goo.gle/debugonly  filter_metadata { key: "envoy-gateway" value { ... } }`

  Parsing fails at token 1.

  After this PR:

`filter_metadata { key: "envoy-gateway" value { ... } }`

This is protobuf text format and parses via TextFormat::ParseFromString(...).

**Compatibility notes**

  - This restores 1.36.x-like effective behavior for ext_proc users (parseable metadata strings), while using the correct serialization API.
  - Minor formatting differences vs 1.36.x debug output are possible (whitespace/order), but output is now stable machine-readable textproto.
  - Scope includes other call sites using Expr::print(...) for message-valued CEL results (for example rate-limit descriptor CEL stringification).
  
Additional Description:
Risk Level: low
Testing: unit and integration test
Docs Changes:
Release Notes: yes
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit envoyproxy#43466]
[Optional Deprecated:]
[Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

---------

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
grnmeira pushed a commit to grnmeira/envoy that referenced this pull request Mar 20, 2026
Signed-off-by: Jonh Wendell <jwendell@redhat.com>
Signed-off-by: Gustavo <grnmeira@gmail.com>
fishcakez pushed a commit to fishcakez/envoy that referenced this pull request Mar 25, 2026
…37 behavior under Protobuf 30+) (envoyproxy#43508)

Commit Message:

Envoy 1.37.0 updated protobuf from 29.3 to 33.2. That dependency change
altered debug-string output semantics and broke behavior that worked in
1.36.x for ext_proc consumers parsing `xds.virtual_host_metadata`.

This behavior change was introduced in envoyproxy#42435 and envoyproxy#42827.

This PR switches message serialization from debug-string APIs to
protobuf text-format APIs so message-valued CEL attributes are
machine-parseable again, as recommended by protobuf programming guides.
https://protobuf.dev/programming-guides/deserialize-debug

 **What broke in 1.37.0**

- In both 1.36.x and 1.37.0, message-valued CEL results were stringified
via ShortDebugString().
  - In 1.36.x (protobuf 29.3), that output was parseable.
- In 1.37.0 (protobuf 33.2), debug strings are now prefixed with
`goo.gle/debugonly` / `goo.gle/debugstr`, which is intentionally
non-parseable as textproto.
- Result: ext_proc implementations that parse
`xds.virtual_host_metadata` as textproto started failing after upgrading
to 1.37.0.
  
**Note**: xds metadata attributes in ext_proc requests are **not
diagnostic log fields**; they are machine-to-machine payload data
consumed by external processors. External processors parse these values
to make policy and routing decisions, so serialization must be stable
and machine-readable by standard protobuf tooling. `DebugString` is a
diagnostic format with no compatibility contract, and in protobuf 30+ it
may include `goo.gle/debug...` prefixes that intentionally break
parsing. For this path, protobuf `TextFormat` is the correct format, not
debug serialization.


**Example**

  Given virtual host metadata:

```yaml
  {
    "metadata": {
      "filterMetadata": {
        "envoy-gateway": {
          "resources": [
            {
              "kind": "Gateway",
              "name": "eg",
              "namespace": "default",
              "sectionName": "http"
            }
          ]
        }
      }
    }
  }
 ```

  Before (1.37.0 + protobuf 30+ path), ext_proc may receive:

`goo.gle/debugonly  filter_metadata { key: "envoy-gateway" value { ... } }`

  Parsing fails at token 1.

  After this PR:

`filter_metadata { key: "envoy-gateway" value { ... } }`

This is protobuf text format and parses via TextFormat::ParseFromString(...).

**Compatibility notes**

  - This restores 1.36.x-like effective behavior for ext_proc users (parseable metadata strings), while using the correct serialization API.
  - Minor formatting differences vs 1.36.x debug output are possible (whitespace/order), but output is now stable machine-readable textproto.
  - Scope includes other call sites using Expr::print(...) for message-valued CEL results (for example rate-limit descriptor CEL stringification).
  
Additional Description:
Risk Level: low
Testing: unit and integration test
Docs Changes:
Release Notes: yes
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit envoyproxy#43466]
[Optional Deprecated:]
[Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

---------

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
krinkinmu pushed a commit to grnmeira/envoy that referenced this pull request Apr 20, 2026
…37 behavior under Protobuf 30+) (envoyproxy#43508)

Commit Message:

Envoy 1.37.0 updated protobuf from 29.3 to 33.2. That dependency change
altered debug-string output semantics and broke behavior that worked in
1.36.x for ext_proc consumers parsing `xds.virtual_host_metadata`.

This behavior change was introduced in envoyproxy#42435 and envoyproxy#42827.

This PR switches message serialization from debug-string APIs to
protobuf text-format APIs so message-valued CEL attributes are
machine-parseable again, as recommended by protobuf programming guides.
https://protobuf.dev/programming-guides/deserialize-debug

 **What broke in 1.37.0**

- In both 1.36.x and 1.37.0, message-valued CEL results were stringified
via ShortDebugString().
  - In 1.36.x (protobuf 29.3), that output was parseable.
- In 1.37.0 (protobuf 33.2), debug strings are now prefixed with
`goo.gle/debugonly` / `goo.gle/debugstr`, which is intentionally
non-parseable as textproto.
- Result: ext_proc implementations that parse
`xds.virtual_host_metadata` as textproto started failing after upgrading
to 1.37.0.
  
**Note**: xds metadata attributes in ext_proc requests are **not
diagnostic log fields**; they are machine-to-machine payload data
consumed by external processors. External processors parse these values
to make policy and routing decisions, so serialization must be stable
and machine-readable by standard protobuf tooling. `DebugString` is a
diagnostic format with no compatibility contract, and in protobuf 30+ it
may include `goo.gle/debug...` prefixes that intentionally break
parsing. For this path, protobuf `TextFormat` is the correct format, not
debug serialization.


**Example**

  Given virtual host metadata:

```yaml
  {
    "metadata": {
      "filterMetadata": {
        "envoy-gateway": {
          "resources": [
            {
              "kind": "Gateway",
              "name": "eg",
              "namespace": "default",
              "sectionName": "http"
            }
          ]
        }
      }
    }
  }
 ```

  Before (1.37.0 + protobuf 30+ path), ext_proc may receive:

`goo.gle/debugonly  filter_metadata { key: "envoy-gateway" value { ... } }`

  Parsing fails at token 1.

  After this PR:

`filter_metadata { key: "envoy-gateway" value { ... } }`

This is protobuf text format and parses via TextFormat::ParseFromString(...).

**Compatibility notes**

  - This restores 1.36.x-like effective behavior for ext_proc users (parseable metadata strings), while using the correct serialization API.
  - Minor formatting differences vs 1.36.x debug output are possible (whitespace/order), but output is now stable machine-readable textproto.
  - Scope includes other call sites using Expr::print(...) for message-valued CEL results (for example rate-limit descriptor CEL stringification).
  
Additional Description:
Risk Level: low
Testing: unit and integration test
Docs Changes:
Release Notes: yes
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit envoyproxy#43466]
[Optional Deprecated:]
[Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

---------

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
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.

6 participants