-
Notifications
You must be signed in to change notification settings - Fork 3k
Proxy Registry: refactoring, Redis Client: add support for Proxy Registry #50834
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
Conversation
|
@ppalaga Could you please also take a look? Especially at the 2nd commit, where I fix a few glaring issues. I'd personally do a bigger rewrite (e.g. I don't like how the recorder object and the bean are the same thing, or how |
This comment has been minimized.
This comment has been minimized.
|
🎊 PR Preview 66808d9 has been successfully built and deployed to https://quarkus-pr-main-50834-preview.surge.sh/version/main/guides/
|
This comment has been minimized.
This comment has been minimized.
|
I'm aware of the test failures and I'm looking for the best solution. It might involve a deeper refactoring of the Proxy Registry, which I originally wanted to avoid :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After a slightly deeper look, I agree with @Ladicek. We would need to change the proxy config.
| } | ||
| final Optional<NamedProxyConfig> namedProxyConfig = namedProxyConfigs.getOrDefault(plainName, Optional.empty()); | ||
| if (namedProxyConfig == null) { | ||
| if (namedProxyConfig.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks @Ladicek!
@Ladicek please feel free to go ahead. This is the right time to do it, while not many extensions were not made aware of the proxy registry yet. |
|
OK, will do. |
The public API is in the `io.quarkus.proxy` package and consists of: - `ProxyType`: an enum of proxy types (HTTP, SOCKS4, SOCKS5) - `ProxyConfiguration`: an interface that provides access to configured proxy - `ProxyConfigurationRegistry`: an interface that allows looking up a named proxy configuration, optimized for the most common usage The `io.quarkus.proxy.runtime` package contains implementation, which is: - `ProxyConfigurationRecorder`: Quarkus recorder that provides a `Supplier` that is used in 2 ways: a proxy registry carrier stored in a build item, and a recorder proxy for a `ProxyConfigurationRegistry` synthetic bean - `ProxyConfigurationRegistryImpl`: implementation of `ProxyConfigurationRegistry` that is created by the recorder The config interface is now in the `io.quarkus.proxy.runtime.config`, because the interface itself is not a public API. The `deployment` module gains a `ProxyRegistryBuildItem` that can be consumed by build steps that need to invoke recorder methods with proxy configuration. The `ProxyRegistryProcessor` hasn't changed much (except of the name). Finally, this commit adds a few basic unit tests to the Proxy Registry extension.
0532750 to
29a907f
Compare
|
I refactored the Proxy Registry extension, so I'd like to ask @ppalaga and @geoand for review. I think the most important parts are:
|
Status for workflow
|
Status for workflow
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks @Ladicek!

Follows up on #50709
Fixes #50822