Skip to content

update the code style#44025

Merged
ggreenway merged 2 commits into
envoyproxy:mainfrom
wbpcode:dev-update-style
Mar 20, 2026
Merged

update the code style#44025
ggreenway merged 2 commits into
envoyproxy:mainfrom
wbpcode:dev-update-style

Conversation

@wbpcode
Copy link
Copy Markdown
Member

@wbpcode wbpcode commented Mar 19, 2026

Commit Message: update the code style
Additional Description:

Based on offline discussion of maintainers.

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

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
@wbpcode
Copy link
Copy Markdown
Member Author

wbpcode commented Mar 19, 2026

cc @envoyproxy/envoy-maintainers

nezdolik
nezdolik previously approved these changes Mar 19, 2026
tyxia
tyxia previously approved these changes Mar 19, 2026
Copy link
Copy Markdown
Member

@tyxia tyxia left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks

Comment thread STYLE.md Outdated
Comment thread STYLE.md Outdated
Comment thread STYLE.md Outdated
Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Copy link
Copy Markdown
Member

@tyxia tyxia left a comment

Choose a reason for hiding this comment

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

Thanks

Comment thread STYLE.md
@ggreenway ggreenway merged commit 99a5ea0 into envoyproxy:main Mar 20, 2026
29 checks passed
@wbpcode wbpcode deleted the dev-update-style branch March 20, 2026 17:50
wbpcode added a commit that referenced this pull request Mar 24, 2026
…ost() (#44046)

Commit Message: stream info: prefer reference rather than shared pointer
for virtualhost()
Additional Description:

See #44025 for our new style.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
wbpcode added a commit that referenced this pull request Mar 24, 2026
…alhost() (#44048)

Commit Message: http: prefer to return reference rather than shared
pointer for virtualhost()
Additional Description:

See #44025 for our new style.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
wbpcode added a commit that referenced this pull request Mar 25, 2026
…ClusterInfo() (#44042)

Commit Message: stream info: return reference rather than copy of shared
pointer
Additional Description:

Rather then return a copy of shared pointer, we prefer to use reference
except we do want to extend the lifetime of the object.

**NOTE: the previous upstreamClusterInfo will return an
absl::optional<Upstream::ClusterInfoConstSharedPtr> and now, the new
upstreamClusterInfoSharedPtr will only return
Upstream::ClusterInfoConstSharedPtr directly. Because we can find in the
whole code base, no one want to distinguish it is nullptr or never been
set.**

See #44025 for the code style
change.

Risk Level: low. Even for the forks, it should be super easy to address
this change.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: code <wbphub@gmail.com>
Co-authored-by: Raven Black <ravenblack@gmail.com>
wbpcode added a commit that referenced this pull request Mar 25, 2026
…fo() (#44068)

Commit Message: http: prefer to return reference rather than shared ptr
for clusterInfo()
Additional Description:

See #44025 for more detail.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
fishcakez pushed a commit to fishcakez/envoy that referenced this pull request Mar 25, 2026
…fo() (envoyproxy#44068)

Commit Message: http: prefer to return reference rather than shared ptr
for clusterInfo()
Additional Description:

See envoyproxy#44025 for more detail.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
wbpcode added a commit that referenced this pull request Mar 26, 2026
…43938)

Commit Message: stream info: return reference rather than copy of shared
pointer
Additional Description:

See #44025

This pr update previous `route()` as `routeSharedPtr()` and add a new
`route()` which will return `OptRef<const Route>`.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
wbpcode added a commit that referenced this pull request Mar 28, 2026
Commit Message: stream info: prefer reference rather than shared pointer
for route()
Additional Description:

See new style #44025 for more detail

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: code <wbphub@gmail.com>
TAOXUY pushed a commit to TAOXUY/envoy that referenced this pull request Apr 1, 2026
Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: Xuyang Tao <taoxuy@google.com>
TAOXUY pushed a commit to TAOXUY/envoy that referenced this pull request Apr 1, 2026
…ost() (envoyproxy#44046)

Commit Message: stream info: prefer reference rather than shared pointer
for virtualhost()
Additional Description:

See envoyproxy#44025 for our new style.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: Xuyang Tao <taoxuy@google.com>
TAOXUY pushed a commit to TAOXUY/envoy that referenced this pull request Apr 1, 2026
…alhost() (envoyproxy#44048)

Commit Message: http: prefer to return reference rather than shared
pointer for virtualhost()
Additional Description:

See envoyproxy#44025 for our new style.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: Xuyang Tao <taoxuy@google.com>
TAOXUY pushed a commit to TAOXUY/envoy that referenced this pull request Apr 1, 2026
…ClusterInfo() (envoyproxy#44042)

Commit Message: stream info: return reference rather than copy of shared
pointer
Additional Description:

Rather then return a copy of shared pointer, we prefer to use reference
except we do want to extend the lifetime of the object.

**NOTE: the previous upstreamClusterInfo will return an
absl::optional<Upstream::ClusterInfoConstSharedPtr> and now, the new
upstreamClusterInfoSharedPtr will only return
Upstream::ClusterInfoConstSharedPtr directly. Because we can find in the
whole code base, no one want to distinguish it is nullptr or never been
set.**

See envoyproxy#44025 for the code style
change.

Risk Level: low. Even for the forks, it should be super easy to address
this change.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: code <wbphub@gmail.com>
Co-authored-by: Raven Black <ravenblack@gmail.com>
Signed-off-by: Xuyang Tao <taoxuy@google.com>
TAOXUY pushed a commit to TAOXUY/envoy that referenced this pull request Apr 1, 2026
…fo() (envoyproxy#44068)

Commit Message: http: prefer to return reference rather than shared ptr
for clusterInfo()
Additional Description:

See envoyproxy#44025 for more detail.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: Xuyang Tao <taoxuy@google.com>
TAOXUY pushed a commit to TAOXUY/envoy that referenced this pull request Apr 1, 2026
…nvoyproxy#43938)

Commit Message: stream info: return reference rather than copy of shared
pointer
Additional Description:

See envoyproxy#44025

This pr update previous `route()` as `routeSharedPtr()` and add a new
`route()` which will return `OptRef<const Route>`.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: Xuyang Tao <taoxuy@google.com>
TAOXUY pushed a commit to TAOXUY/envoy that referenced this pull request Apr 1, 2026
…roxy#44078)

Commit Message: stream info: prefer reference rather than shared pointer
for route()
Additional Description:

See new style envoyproxy#44025 for more detail

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: code <wbphub@gmail.com>
Signed-off-by: Xuyang Tao <taoxuy@google.com>
citrus7 pushed a commit to citrus7/envoy that referenced this pull request Apr 1, 2026
…ost() (envoyproxy#44046)

Commit Message: stream info: prefer reference rather than shared pointer
for virtualhost()
Additional Description:

See envoyproxy#44025 for our new style.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: Jonathan Wu <jtwu@google.com>
citrus7 pushed a commit to citrus7/envoy that referenced this pull request Apr 1, 2026
…alhost() (envoyproxy#44048)

Commit Message: http: prefer to return reference rather than shared
pointer for virtualhost()
Additional Description:

See envoyproxy#44025 for our new style.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: Jonathan Wu <jtwu@google.com>
citrus7 pushed a commit to citrus7/envoy that referenced this pull request Apr 1, 2026
…ClusterInfo() (envoyproxy#44042)

Commit Message: stream info: return reference rather than copy of shared
pointer
Additional Description:

Rather then return a copy of shared pointer, we prefer to use reference
except we do want to extend the lifetime of the object.

**NOTE: the previous upstreamClusterInfo will return an
absl::optional<Upstream::ClusterInfoConstSharedPtr> and now, the new
upstreamClusterInfoSharedPtr will only return
Upstream::ClusterInfoConstSharedPtr directly. Because we can find in the
whole code base, no one want to distinguish it is nullptr or never been
set.**

See envoyproxy#44025 for the code style
change.

Risk Level: low. Even for the forks, it should be super easy to address
this change.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: code <wbphub@gmail.com>
Co-authored-by: Raven Black <ravenblack@gmail.com>
Signed-off-by: Jonathan Wu <jtwu@google.com>
citrus7 pushed a commit to citrus7/envoy that referenced this pull request Apr 1, 2026
…fo() (envoyproxy#44068)

Commit Message: http: prefer to return reference rather than shared ptr
for clusterInfo()
Additional Description:

See envoyproxy#44025 for more detail.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: Jonathan Wu <jtwu@google.com>
citrus7 pushed a commit to citrus7/envoy that referenced this pull request Apr 1, 2026
…nvoyproxy#43938)

Commit Message: stream info: return reference rather than copy of shared
pointer
Additional Description:

See envoyproxy#44025

This pr update previous `route()` as `routeSharedPtr()` and add a new
`route()` which will return `OptRef<const Route>`.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: Jonathan Wu <jtwu@google.com>
citrus7 pushed a commit to citrus7/envoy that referenced this pull request Apr 1, 2026
…roxy#44078)

Commit Message: stream info: prefer reference rather than shared pointer
for route()
Additional Description:

See new style envoyproxy#44025 for more detail

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: code <wbphub@gmail.com>
Signed-off-by: Jonathan Wu <jtwu@google.com>
nshipilov pushed a commit to nshipilov/envoy that referenced this pull request Apr 13, 2026
Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: Nick Shipilov <nick.shipilov.n@gmail.com>
nshipilov pushed a commit to nshipilov/envoy that referenced this pull request Apr 13, 2026
…ost() (envoyproxy#44046)

Commit Message: stream info: prefer reference rather than shared pointer
for virtualhost()
Additional Description:

See envoyproxy#44025 for our new style.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: Nick Shipilov <nick.shipilov.n@gmail.com>
nshipilov pushed a commit to nshipilov/envoy that referenced this pull request Apr 13, 2026
…alhost() (envoyproxy#44048)

Commit Message: http: prefer to return reference rather than shared
pointer for virtualhost()
Additional Description:

See envoyproxy#44025 for our new style.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: Nick Shipilov <nick.shipilov.n@gmail.com>
nshipilov pushed a commit to nshipilov/envoy that referenced this pull request Apr 13, 2026
…ClusterInfo() (envoyproxy#44042)

Commit Message: stream info: return reference rather than copy of shared
pointer
Additional Description:

Rather then return a copy of shared pointer, we prefer to use reference
except we do want to extend the lifetime of the object.

**NOTE: the previous upstreamClusterInfo will return an
absl::optional<Upstream::ClusterInfoConstSharedPtr> and now, the new
upstreamClusterInfoSharedPtr will only return
Upstream::ClusterInfoConstSharedPtr directly. Because we can find in the
whole code base, no one want to distinguish it is nullptr or never been
set.**

See envoyproxy#44025 for the code style
change.

Risk Level: low. Even for the forks, it should be super easy to address
this change.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: code <wbphub@gmail.com>
Co-authored-by: Raven Black <ravenblack@gmail.com>
Signed-off-by: Nick Shipilov <nick.shipilov.n@gmail.com>
nshipilov pushed a commit to nshipilov/envoy that referenced this pull request Apr 13, 2026
…fo() (envoyproxy#44068)

Commit Message: http: prefer to return reference rather than shared ptr
for clusterInfo()
Additional Description:

See envoyproxy#44025 for more detail.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: Nick Shipilov <nick.shipilov.n@gmail.com>
nshipilov pushed a commit to nshipilov/envoy that referenced this pull request Apr 13, 2026
…nvoyproxy#43938)

Commit Message: stream info: return reference rather than copy of shared
pointer
Additional Description:

See envoyproxy#44025

This pr update previous `route()` as `routeSharedPtr()` and add a new
`route()` which will return `OptRef<const Route>`.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: Nick Shipilov <nick.shipilov.n@gmail.com>
nshipilov pushed a commit to nshipilov/envoy that referenced this pull request Apr 13, 2026
…roxy#44078)

Commit Message: stream info: prefer reference rather than shared pointer
for route()
Additional Description:

See new style envoyproxy#44025 for more detail

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: code <wbphub@gmail.com>
Signed-off-by: Nick Shipilov <nick.shipilov.n@gmail.com>
krinkinmu pushed a commit to grnmeira/envoy that referenced this pull request Apr 20, 2026
Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
krinkinmu pushed a commit to grnmeira/envoy that referenced this pull request Apr 20, 2026
…ost() (envoyproxy#44046)

Commit Message: stream info: prefer reference rather than shared pointer
for virtualhost()
Additional Description:

See envoyproxy#44025 for our new style.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
krinkinmu pushed a commit to grnmeira/envoy that referenced this pull request Apr 20, 2026
…alhost() (envoyproxy#44048)

Commit Message: http: prefer to return reference rather than shared
pointer for virtualhost()
Additional Description:

See envoyproxy#44025 for our new style.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
krinkinmu pushed a commit to grnmeira/envoy that referenced this pull request Apr 20, 2026
…ClusterInfo() (envoyproxy#44042)

Commit Message: stream info: return reference rather than copy of shared
pointer
Additional Description:

Rather then return a copy of shared pointer, we prefer to use reference
except we do want to extend the lifetime of the object.

**NOTE: the previous upstreamClusterInfo will return an
absl::optional<Upstream::ClusterInfoConstSharedPtr> and now, the new
upstreamClusterInfoSharedPtr will only return
Upstream::ClusterInfoConstSharedPtr directly. Because we can find in the
whole code base, no one want to distinguish it is nullptr or never been
set.**

See envoyproxy#44025 for the code style
change.

Risk Level: low. Even for the forks, it should be super easy to address
this change.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: code <wbphub@gmail.com>
Co-authored-by: Raven Black <ravenblack@gmail.com>
krinkinmu pushed a commit to grnmeira/envoy that referenced this pull request Apr 20, 2026
…fo() (envoyproxy#44068)

Commit Message: http: prefer to return reference rather than shared ptr
for clusterInfo()
Additional Description:

See envoyproxy#44025 for more detail.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
krinkinmu pushed a commit to grnmeira/envoy that referenced this pull request Apr 20, 2026
…nvoyproxy#43938)

Commit Message: stream info: return reference rather than copy of shared
pointer
Additional Description:

See envoyproxy#44025

This pr update previous `route()` as `routeSharedPtr()` and add a new
`route()` which will return `OptRef<const Route>`.

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
krinkinmu pushed a commit to grnmeira/envoy that referenced this pull request Apr 20, 2026
…roxy#44078)

Commit Message: stream info: prefer reference rather than shared pointer
for route()
Additional Description:

See new style envoyproxy#44025 for more detail

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

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: code <wbphub@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.

7 participants