Skip to content

Trigger CI rerun

1929540
Select commit
Loading
Failed to load commit list.
Open

router/scoped_rds: guard on-demand update for inline-config scopes #44071

Trigger CI rerun
1929540
Select commit
Loading
Failed to load commit list.
CI (Envoy) / Mobile/Release validation skipped Mar 22, 2026 in 0s

Check was skipped

This check was not triggered in this CI run

Details

Request (pr/44071/main@1929540)

whutwhu @whutwhu 1929540 #44071 merge main@e980367

router/scoped_rds: guard on-demand update for inline-config scopes

Commit Message:
This PR fixes an SRDS crash when a scoped route uses inline route_configuration instead of route_configuration_name.

Additional Description:
When a scoped route uses inline route_configuration instead of route_configuration_name, the scope is added to scope_name_by_hash_ but not to route_provider_by_scope_ (no RDS provider is needed). If the on-demand route update path (onDemandRdsUpdate) is triggered for such a scope, route_provider_by_scope_[scope_name] inserts a null unique_ptr via operator[] and then dereferences it, causing a crash.

Use find() instead of operator[] to look up the scope in route_provider_by_scope_. If the scope has no RDS provider (inline config), return false to the callback instead of crashing.

Risk Level:
Low

Testing:
Unit test added

Signed-off-by: Xin Li lixinusa2013@gmail.com

Environment

Request variables

Key Value
ref 6dafd4c
sha 1929540
pr 44071
base-sha e980367
actor whutwhu @whutwhu
message router/scoped_rds: guard on-demand update for inline-config scopes...
started 1774200297.712007
target-branch main
trusted false
Build image

Container image/s (as used in this CI run)

Key Value
default docker.io/envoyproxy/envoy-build:86873047235e9b8232df989a5999b9bebf9db69c
mobile docker.io/envoyproxy/envoy-build:mobile-86873047235e9b8232df989a5999b9bebf9db69c
Version

Envoy version (as used in this CI run)

Key Value
major 1
minor 38
patch 0
dev true