-
Notifications
You must be signed in to change notification settings - Fork 614
Add custom URL path configuration for load balancer routing #2689
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
Draft
Copilot
wants to merge
7
commits into
main
Choose a base branch
from
copilot/add-custom-url-path-configuration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Added CUSTOM_URL_PATH property to ClientConfigProperties - Added customURLPath() builder method to Client.Builder - Modified HttpAPIClientHelper.executeRequest to append custom path to URLs - Added comprehensive unit tests for the new feature - All tests passing Co-authored-by: chernser <[email protected]>
- Extracted common URL building logic into helper method - Improved code maintainability by reducing duplication - Clarified documentation for customURLPath parameter Co-authored-by: chernser <[email protected]>
- Created detailed usage guide with examples - Documented various scenarios and use cases - Added load balancer configuration example - Included compatibility information Co-authored-by: chernser <[email protected]>
Copilot
AI
changed the title
[WIP] Add support for custom URL path in client configuration
Add custom URL path configuration for load balancer routing
Dec 10, 2025
Contributor
|
@copilot Please sign CLA. Thanks! |
Contributor
|
@copilot |
Contributor
|
@copilot |
- Rewrote tests to exercise actual production code - Tests now call Client.Builder.customURLPath() method - Tests verify ClientConfigProperties.CUSTOM_URL_PATH configuration - Tests check configuration parsing and various path formats - Removed integration tests that required running server - All tests are unit tests that exercise the production code directly Co-authored-by: chernser <[email protected]>
Author
The tests were checking for exactly 32 configuration properties, but the new CUSTOM_URL_PATH property increased the count to 33. Updated both testDefaultSettings and testWithOldDefaults assertions. Co-authored-by: chernser <[email protected]>
Author
|
Contributor
|
@copilot |
The test at line 257 calls useTimeZone() which adds an extra configuration property (USE_TIMEZONE), so it has one more property than the other tests. Updated the assertion to expect 34 instead of 33. Co-authored-by: chernser <[email protected]>
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


Summary
Enables routing to different ClickHouse instances behind a load balancer by configuring custom URL paths (e.g.,
/sales/db,/app/db). Database selection remains viaX-ClickHouse-Databaseheader.Changes
ClientConfigProperties: AddedCUSTOM_URL_PATHproperty (String, default: "")Client.Builder: AddedcustomURLPath(String)method for fluent configurationHttpAPIClientHelper.executeRequest(): Appends custom path to base URL viaURIBuilder, handles path concatenationClient.Builder.customURLPath()method,ClientConfigProperties.CUSTOM_URL_PATHconfiguration, and configuration parsing with various path formatsClientTeststo account for the newCUSTOM_URL_PATHproperty:useTimeZone()which adds an additional property)Example
Checklist
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.