refactor(server): unify URL configs when scheme is missing#2944
Merged
imbajin merged 11 commits intoapache:masterfrom Feb 3, 2026
Merged
refactor(server): unify URL configs when scheme is missing#2944imbajin merged 11 commits intoapache:masterfrom
imbajin merged 11 commits intoapache:masterfrom
Conversation
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.
Purpose of the PR
http:///https://). If a user sets something like127.0.0.1:8080, it can fail to parse or behave inconsistently compared to other modules that already default the scheme.This PR fixes that by normalizing only the relevant server URL options: if the scheme is missing, we auto-prefix a sensible default, while leaving explicitly provided schemes untouched.
Also covered the review corner case:
server.k8s_urlshould default tohttps://(so we don’t accidentally downgrade it tohttp://).Main Changes
HugeConfig.get(...)now applies URL normalization for a small allowlist of keys:restserver.url→ defaulthttp://gremlinserver.url→ defaulthttp://server.urls_to_pd→ defaulthttp://server.k8s_url→ defaulthttps://Normalization only triggers when:
String, andIf the value already starts with
http://orhttps://, it’s left as-is.Non-string config values are untouched.
Verifying these changes
Tests are included and you can verify the behavior like this:
Added unit tests in
HugeConfigTestcovering:server.k8s_urlmissing scheme → becomeshttps://...(no accidental downgrade)Does this PR potentially affect the following parts?
Documentation Status
Doc - TODODoc - DoneDoc - No Need