[release/0.5] AAP-85491: sanitize NO_PROXY IPv6 CIDR entries for httpx compatibility - #2597
Open
SiddharthRajaraman wants to merge 1 commit into
Conversation
OpenShift cluster proxies inject IPv6 CIDR bypass entries into NO_PROXY, which crash httpx during client initialization. Strip unsupported entries at startup so lightspeed-chatbot-api can start on IPv6 single-stack clusters. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
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.
Description
On OpenShift IPv6 single-stack clusters with a cluster-wide
Proxy,lightspeed-chatbot-apiCrashLoops at startup whenNO_PROXYcontains IPv6 CIDR entries (for examplefd00:1234:5678::/64). httpx mis-parses those values and raiseshttpx.InvalidURL: Invalid port: '1234:5678::'during client initialization (encode/httpx#3221). The upstream httpx fix exists in encode/httpx#3741 but has not been released.This change sanitizes
NO_PROXY/no_proxyat Lightspeed Core Stack startup by removing IPv6 CIDR entries that httpx cannot parse. Supported entries such as hostnames, domains, IPv4 addresses, and IPv4 CIDRs are preserved. Removed entries are logged at warning level.Type of change
pyproject.toml+uv.lock]requirements.*.txtfor Konflux]Tools used to create PR
Identify any AI code assistants used in this PR (for transparency and review context)
Related Tickets & Documents
Checklist before requesting a review
Testing
Please provide detailed steps to perform tests related to this code change.
How were the fix/results from this change verified? Please provide relevant screenshots or results.
Unit tests:
Lint (changed files):
Verification:
test_sanitize_removes_only_ipv6_cidr_entriesconfirms OpenShift-styleNO_PROXYvalues are sanitized while preservinglocalhost, IPv4 CIDRs, and internal DNS suffixes.test_httpx_client_initializes_after_sanitizeconfirms httpx no longer crashes once unsupported IPv6 CIDR entries are removed.Made with Cursor