envoyproxy / envoyproxy/envoy

Setting runtime fraction of numerator 0 and FractionalPercent_HUNDRED for RequestMirrorPolicy ends up using FractionalPercent_THOUSAND

Offen
#8,299 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug help wanted
Vorherrschende Sprache
C++
Sterne
28.9k
Forks
5.6k
Ø Merge
1 T. 22 Std.
Gemergte PRs (30 T.)
430

Beschreibung

*Title*: *Setting runtime fraction of numerator 0 and FractionalPercent_HUNDRED for RequestMirrorPolicy ends up using FractionalPercent_THOUSAND*

*Description*:
We are rolling our RequestMirrorPolicy, we set the path within the Runtime Fraction but not the default like so:

```go
RuntimeFraction: &core.RuntimeFractionalPercent{
RuntimeKey: policy.RuntimeKey,
DefaultValue: &envoytype.FractionalPercent{
Numerator: 0,
Denominator: envoytype.FractionalPercent_HUNDRED,
},
},
```

But as I change the runtime flag, I am noticing that the runtime fraction is using `FractionalPercent_TEN_THOUSAND` as a denominator based on the aggregated stats.

Since `envoytype.FractionalPercent_HUNDRED` is the default value, I believe envoy is treating `DefaultValue` as a nil value and exercising this code path: https://github.com/envoyproxy/data-plane-api/blob/master/envoy/api/v2/route/route.proto#L640-L645

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.