Skip to content

http: add server factory only factory support to geoip#46224

Open
wbpcode wants to merge 1 commit into
envoyproxy:mainfrom
wbpcode:route-factory-geoip
Open

http: add server factory only factory support to geoip#46224
wbpcode wants to merge 1 commit into
envoyproxy:mainfrom
wbpcode:route-factory-geoip

Conversation

@wbpcode

@wbpcode wbpcode commented Jul 17, 2026

Copy link
Copy Markdown
Member

Commit Message: http: add server factory only factory support to geoip
Additional Description:
This adds the server-factory-context-only filter factory creation method
(createHttpFilterFactoryFromProtoTyped taking only a ServerFactoryContext,
introduced in #45989) to the geoip HTTP filter(s).

This allows these filters to be created in contexts where only a
ServerFactoryContext is available (e.g. route/virtual-host level filter
configuration) rather than requiring the full downstream FactoryContext.
The existing downstream FactoryContext path is preserved and now delegates
to a shared helper, so behavior for existing use cases is unchanged.

Generative AI (Claude) was used to assist with this change. I reviewed all changes.

Risk Level: mid, may break forks.
Testing: Existing/added unit config tests; CI.
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

@repokitteh-read-only

Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #46224 was opened by wbpcode.

see: more, trace.

@wbpcode

wbpcode commented Jul 18, 2026

Copy link
Copy Markdown
Member Author

/coverage

@repokitteh-read-only

Copy link
Copy Markdown

Coverage for this Pull Request will be rendered here:

https://storage.googleapis.com/envoy-cncf-pr/46224/coverage/index.html

For comparison, current coverage on main branch is here:

https://storage.googleapis.com/envoy-cncf-postsubmit/main/coverage/index.html

The coverage results are (re-)rendered each time the CI Envoy/Checks (coverage) job completes.

🐱

Caused by: a #46224 (comment) was created by @wbpcode.

see: more, trace.

Signed-off-by: wbpcode <wbphub@gmail.com>
@wbpcode
wbpcode force-pushed the route-factory-geoip branch from 0494671 to b6cdb25 Compare July 18, 2026 08:02
@wbpcode
wbpcode marked this pull request as ready for review July 18, 2026 08:02
virtual DriverSharedPtr
createGeoipProviderDriver(const Protobuf::Message& config, const std::string& stat_prefix,
Server::Configuration::FactoryContext& context) PURE;
Server::Configuration::ServerFactoryContext& context) PURE;

@wbpcode wbpcode Jul 18, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This may break our forks because this API changes if our forks have a custom GeoipProvider implementation, but I have no good idea to keep the compatbility.

I think it's acceptable because this is not an extension point like HTTP filter.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

And I checked the existing implementation of this extension point, it's possible the cached driver be shared across listeners, the server context is more appropriate for this API.

Anyway, I will let maintainers to check to this point.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

4 participants