Repository navigation
Conversation
…n unsupported value
Aias00
left a comment
There was a problem hiding this comment.
Stream Agent analysis
SYNTHESIS/FINAL review of #8341 at head 50f8960 aggregating child partition reviews. Both child reviews returned INCONCLUSIVE; one due to missing CI status and unverified cross-file property name/case-sensitivity, the other due to missing implementation diff partition (part-1) and unknown CI. CI passed=false, all_parts_passed=false. No blocking HIGH/CRITICAL defects identified in supplied scopes, but completeness and cross-file correctness cannot be confirmed.
Evidence
- Frozen attachment 5d8a43fe-f6cd-4198-ab5c-229f95d624b2: SYNTHESIS/FINAL review shows child INCONCLUSIVE, CI passed=false, all_parts_passed=false
- Child reduce-0-0 INCONCLUSIVE due to no CI status and open cross-file verification of property name consistency and @ConditionalOnProperty case sensitivity
- Child reduce-0-1 INCONCLUSIVE due to missing implementation diff partition (part-1) and unknown CI
Recommended next steps
- Provide complete implementation diff partition (part-1) for full review
- Ensure CI checks complete and pass, reporting status
- Verify cross-file property name consistency and @ConditionalOnProperty case sensitivity
Scope: captured diff and GitHub check metadata only; no local tests were executed.
Task: 65950101-e292-4082-9322-2ce698f293e4 · Commit: 50f8960b0e1ccb87bbcfbcdfdd521ef89067c11f
Review verdict: INCONCLUSIVE
SYNTHESIS/FINAL assessment of PR #8341 at head 50f8960. Child reviews returned INCONCLUSIVE (missing CI status, missing implementation diff partition, unverified cross-file property consistency). all_parts_passed=false and CI passed=false, so FINAL PASS impossible per rules. No HIGH/CRITICAL defects invented; blocking_findings empty. Verdict INCONCLUSIVE preserves uncertainty about cross-file correctness, contract compatibility, and runtime behavior.
Publication: COMMENT (INCONCLUSIVE_REVIEW)
Review details
The review of this PR is inconclusive. The supplied child reviews indicate missing CI status and an unavailable implementation diff partition (part-1), plus open cross-file property consistency checks. Please provide the full diff, ensure CI passes, and confirm property naming/case-sensitivity before final approval.
|
Thanks for the review. This is the SYNTHESIS/FINAL aggregation of two child INCONCLUSIVE reviews, so there is no defect to fix in the code, but the three open items can be closed with evidence. Cross-file property name consistencyThe property name is
@ConditionalOnProperty case sensitivity
The validation follows exactly the same rule ( Values are neither trimmed nor rewritten, because the conditions do not trim either, so a value like CI status19 checks passed, 6 skipped and 2 still running ( Implementation diffThe complete diff is one commit on |
Fixes #8321.
Problem
shenyu.httpclient.strategyacceptsnettyandwebClient. Any other value —web-client,web_client, an empty value, or a value with surrounding whitespace — leaves the gateway in a state where it starts successfully but has no HTTP client plugin at all, and every proxied request fails without any startup hint pointing at the misconfiguration.The two built-in HTTP plugins are selected by mutually exclusive conditional configuration classes in
HttpClientPluginConfiguration:NettyHttpClientConfiguration—@ConditionalOnProperty(name = "shenyu.httpclient.strategy", havingValue = "netty", matchIfMissing = true)WebClientConfiguration—@ConditionalOnProperty(name = "shenyu.httpclient.strategy", havingValue = "webClient")matchIfMissing = trueonly covers the case where the property is absent. When the property is present but does not match either condition, neither plugin bean is registered. The gateway then starts, the plugin chain has no http client node, divide routes never reach an upstream, and with the response plugin enabledResponsePluginfinds no HTTP message writer and fails the request with aNullPointerException. Nothing in the startup log points at the strategy value, andHttpClientProperties.getStrategy()performed no validation either.An empty value is the same failure:
matchIfMissingdoes not apply to a property that is present, so an empty or valueless entry matches neither condition.Root cause
Plugin selection was driven by property conditions while the configured value itself was never validated, so an unsupported value was silently equivalent to "no http client plugin at all". The validation also has to stay compatible with the way the conditions match:
@ConditionalOnPropertycompares the configured value withString#equalsIgnoreCase, soNETTY,webclientandWebClientare legal today and must keep working.Change
HttpClientPropertiesdocuments the legal values on thestrategyproperty and exposes them as theNETTY_STRATEGYandWEB_CLIENT_STRATEGYconstants.HttpClientPropertiesimplementsInitializingBeanand validates the bound value inafterPropertiesSet(), that is once the container has bound the properties and before the gateway serves any traffic. An unsupported value fails the application context withInvalid value 'web-client' for property 'shenyu.httpclient.strategy', supported values are 'netty' and 'webClient'.HttpClientPropertiestherefore also implementsEnvironmentAwareand usesEnvironment#containsPropertyon the same key the conditions read, which distinguishes the two cases exactly.nettyandwebClient, matched case-insensitively, with an absent property still falling back to the netty strategy. Values are neither trimmed nor rewritten, because the conditions do not trim either.RELEASE-NOTES.mddocuments the behavior change.Tests
HttpClientPropertiesTest: unsupported values (web-client,web_client, empty, blank padded,httpclient) are rejected with a message naming the property and both legal values;netty,webClientand their case variants are accepted; an absent value is accepted; a configured but valueless property is rejected while an absent one is accepted;afterPropertiesSet()rejects an unsupported value.HttpClientPluginConfigurationTest: the application context now fails to start forweb-client, for an empty value and for a valueless property, whilenetty,webClient,NETTY,webclientand an absent property still register the corresponding plugin.Red and green: with the new tests in place and the production change reverted, the startup tests fail because the context starts successfully instead of failing; with the production change in place the whole module is green.
Verification
shenyu-plugin-httpclient: 169 tests, 0 failures (163 before plus 6 new).shenyu-spring-boot-starter-plugin-httpclient: 27 tests, 0 failures (21 before plus 6 new).shenyu-plugin-response17 andshenyu-spring-boot-starter-plugin-response3 are unchanged, so the response plugin selection is not affected.BUILD SUCCESS.checkstyle:checkfor both changed modules: 0 violations.Scope note
ResponsePluginConfigurationselects the HTTP message writer from the same property with the same pair of conditions. This change does not touch it: the gateway starter always ships the http client starter, so an unsupported value now fails the gateway startup before the writer selection can matter. A deployment that uses the response starter without the http client starter is not covered here.4 files changed, 235 insertions(+), 4 deletions(-)