wasm: refactor around stats, events and WasmExtension class.#17268
wasm: refactor around stats, events and WasmExtension class.#17268mattklein123 merged 8 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
|
/retest |
|
Retrying Azure Pipelines: |
PiotrSikora
left a comment
There was a problem hiding this comment.
This is actually used by Istio to export more stats. See:
- istio/proxy#2916
- https://github.com/istio/proxy/blob/master/src/envoy/extensions/wasm/wasm.cc
Having said that, it seems that those stats all refer to async fetch, which we don't use anymore, so perhaps it could be removed... cc @mandarjog @kyessenov @bianpengyuan
|
Thanks @PiotrSikora, I should have looked at istio/proxy, but yeah as you said, it looks like a redundant and not used anymore. Also I realized that we could remove I am more than happy to refactor istio/proxy as well since this could bring benefits both to Envoy and Istio/proxy codebase. |
|
We can get rid of async fetch, it is not used anymore. |
That's a bit of a stretch. The fact that Istio doesn't use it anymore doesn't mean that other Envoy users are not using it. In any case, if we want to have this discussion, could you please open a new issue? It's a breaking change that shouldn't be discussed in comments of a "random" PR. |
|
@PiotrSikora agreed wrt Istio, so that cannot be the reason. however the async fetch is racy. @kyessenov @bianpengyuan can we comment on why we decided that we cannot recommend async fetch alone? |
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
|
I found the coverage flakiness on Context::decodeData and encodeData in context.cc: https://github.com/envoyproxy/envoy/blob/main/source/extensions/common/wasm/context.cc#L1723 OK: https://storage.googleapis.com/envoy-pr/f4e1e1e/coverage/source/extensions/common/wasm/context.cc.gcov.html retest for now. |
|
/retest |
|
Retrying Azure Pipelines: |
|
/retest |
|
Retrying Azure Pipelines: |
|
hmm.. looks like a deterministic but I have no idea why this affects these lines after merge main.. |
you need to adjust those values in |
|
yeah but I want to understand why the coverage drops after merging main:
I see that some lines of |
|
OK https://github.com/envoyproxy/envoy/pull/17280/files#diff-a2dee6268db4920c2bd9665ba1429c144cd6a9e158b8845c503fb3d5c6fa273cL410-L411 this dropped the coverage on encode/decodeData and convertFilterDataStatus, and this PR triggered the coverage CI failure somehow. |
|
raised the PR to backfill the coverage #17292 |
Oops, good catch! I wonder why the CI didn't catch it in that PR, though. |
|
Async fetch has no error recovery. If the retries fail and xDS is ACKed, the error is permanent. So it is not recommended unless the network is reliable (which is never true). |
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
|
/lgtm deps |
we also are moving to ECDS, but are using async fetch in the interm. |
…oxy#17268) Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This PR refactors the Wasm codebase around host defined stats, and WasmEvent, and WasmExtension class. Notablely, we delete the WasmExtension and EnvoyExtension classes which seem unused and unnecessary abstraction, and add CreateStatsHandler and LifecycleStatsHandler classes for handling Events and host defined metrics. The primary purpose is to drive the future work for the #16726 and #16403.
Signed-off-by: Takeshi Yoneda takeshi@tetrate.io