Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate the wasm filter to use grpc client cache. #18486

Closed

Conversation

chaoqin-li1123
Copy link
Member

Signed-off-by: chaoqin-li1123 [email protected]

Commit Message: Use AlwaysCache option for grpc client in ratelimit filter and wasm filter
Additional Description: NA
Risk Level: Medium, may have lifetime issue.
Testing: NA

Signed-off-by: chaoqin-li1123 <[email protected]>
@jmarantz
Copy link
Contributor

jmarantz commented Oct 6, 2021

can we split this into 2 PRs? If something goes wrong with one of them it'd be easier to roll back that way.

@chaoqin-li1123 chaoqin-li1123 changed the title Migrate the ratelimit filter and wasm filter to use grpc client cache. Migrate the wasm filter to use grpc client cache. Oct 6, 2021
Signed-off-by: chaoqin-li1123 <[email protected]>
@jmarantz
Copy link
Contributor

jmarantz commented Oct 7, 2021

Let's have Piotr on the wasm team look at this first then I can stamp it. Looks straightforward enough.

@davinci26
Copy link
Member

@PiotrSikora can you PTLAL?

@PiotrSikora
Copy link
Contributor

I'm confused by this change.

Existing option (Grpc::CacheOption::CacheWhenRuntimeEnabled) means that cache behavior is controled using Envoy's runtime feature (envoy.reloadable_features.enable_grpc_async_client_cache), which is currently disabled by default.

Shouldn't the migration path be (1) "disabled by default" (using runtime features), (2) "enabled by default" (using runtime features), (3) "enabled in the code" with runtime feature removed?

Instead, we're migrating from "disabled by default" to "enabled in the code" without the "enabled by default" step. What's the reason for that?

@jmarantz
Copy link
Contributor

/wait

@chaoqin-li1123
Copy link
Member Author

The reason why we are not going through the standard runtime control procedure is that the there are many filters that use grpc cache, so this is not exactly a feature that can be controlled by a single runtime and we would like to enable grpc client cache in filters one by one.

Copy link
Contributor

@PiotrSikora PiotrSikora left a comment

Choose a reason for hiding this comment

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

The reason why we are not going through the standard runtime control procedure is that the there are many filters that use grpc cache, so this is not exactly a feature that can be controlled by a single runtime and we would like to enable grpc client cache in filters one by one.

I don't buy this argument (there is plenty of runtime features that affect multiple filters or Envoy as a whole), but it looks that few other filters were already migrated to AlwaysCache, so feel free to merge this.

Copy link
Contributor

@jmarantz jmarantz left a comment

Choose a reason for hiding this comment

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

I think I'd like someone outside Google, e.g. @lizan or @mattklein123 to just sanity-check this, but lgtm.

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Nov 14, 2021
@jmarantz jmarantz added no stalebot Disables stalebot from closing an issue and removed stale stalebot believes this issue/PR has not been touched recently labels Nov 15, 2021
@jmarantz
Copy link
Contributor

@envoyproxy/senior-maintainers can we get a non-googler senior maintainer review for this? Thanks!

@alyssawilk
Copy link
Contributor

@jmarantz you tagged this as waiting. Is it actually waiting? If it's pure WASM we don't need a senior maintainer pass I think we just need Piotr sign off.

@alyssawilk
Copy link
Contributor

But also it'll get more attention if it's not waiting, which of course exempts it from all the tooling :-/

@PiotrSikora
Copy link
Contributor

@alyssawilk it's actually completely unrelated to Wasm, it's about gRPC client cache in Envoy, and it's been waiting forever since we cannot agree what's the correct process for migrating this runtime feature (see earlier comments).

@chaoqin-li1123
Copy link
Member Author

I actually have another pr that flip the flag without enabling one filter each time.#19253

@alyssawilk
Copy link
Contributor

Ah great. So I think the correct thing to do here is flip the runtime flag to true, then once it has been true for the standard period we can delete the flag, and switch all the call points to cache by default. @chaoqin-li1123 does this sound good to do and if so do you want to close this PR for now since the flags process will take a while?

@chaoqin-li1123
Copy link
Member Author

Sounds good to me. I will close the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no stalebot Disables stalebot from closing an issue waiting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants