Aias00 opened a new issue, #7978:
URL: https://github.com/apache/shenyu/issues/7978

   ### Is there an existing issue for this?
   
   - [x] I have searched the existing issues
   
   ### Current Behavior
   
   With continued=true and a full-flow selector, AbstractShenyuPlugin takes the 
last rule in the list and invokes doExecute directly. It bypasses filterRule, 
including the rule enabled check. A disabled rule is therefore still executable.
   
   ### Expected Behavior
   
   Disabled rules must not execute. Preserve the intended full-flow selection 
semantics among eligible rules, and call the plugin's no-rule handler when no 
enabled rule remains. This issue does not prescribe changing whether full-flow 
rules evaluate conditions or changing their ordering.
   
   ### Steps To Reproduce
   
   1. Enable a concrete test plugin extending AbstractShenyuPlugin.
   2. Add an enabled selector with type=FULL_FLOW (0), continued=true.
   3. Add one rule under it with enabled=false and any valid condition list.
   4. Execute a request using execute(...).block().
   5. Observed: doExecute receives the disabled rule. Expected: it must not 
execute that rule.
   
   Reproduced result from the recording test plugin: `full:disabled`.
   
   ### Anything else?
   
   - Full-flow branch: 
https://github.com/apache/shenyu/blob/862f5e37e894bd8cef85ef540a8629f313e9ecdf/shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/AbstractShenyuPlugin.java#L110-L115
   - Enabled filter used by the ordinary branch: 
https://github.com/apache/shenyu/blob/862f5e37e894bd8cef85ef540a8629f313e9ecdf/shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/AbstractShenyuPlugin.java#L286-L288
   
   ### Environment
   
   ShenYu master, 2.7.2-SNAPSHOT, commit 
`862f5e37e894bd8cef85ef540a8629f313e9ecdf`, Java 17.
   
   ### Validation
   
   Reproduced with a minimal concrete AbstractShenyuPlugin subclass, real 
BaseDataCache/MatchDataCache, Spring MockServerWebExchange and 
execute(...).block(). The subclass records selector/rule IDs in doExecute. 
Match caches use the default enabled settings. The existing 90 targeted 
matching/cache/predicate tests passed; this does not exercise a deployed HTTP 
gateway.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to