boundlessocean1 opened a new pull request, #7845:
URL: https://github.com/apache/shenyu/pull/7845

   Fixes #7751.
   
   Reloading an extension plugin installed the new execution instance but 
retained its old `PluginDataHandler`: `computeIfAbsent` discarded same-name 
replacements. Subsequent configuration updates and removals therefore continued 
to invoke the previous generation.
   
   Replace dynamically registered handlers by plugin name while preserving 
ownership of constructor-provided handlers. Detach extension handlers when the 
ext-directory loader removes a plugin, or when a replacement plugin no longer 
supplies a handler. Collect the candidate handler information before plugin 
activation and publish it after `putExtPlugins` succeeds, retaining the 
previous handler when that activation step fails. This uses the existing 
class-loader activation path and concurrent map; it does not add a global 
transaction across plugin execution and callbacks already in flight.
   
   Add 10 regression tests covering plugin/selector/rule updates, deletes and 
refreshes, built-in ownership, unrelated handlers, removal/re-registration, 
loader handoff, handler-less replacements and activation failures.
   
   ### Validation
   
   - Before the fix: three new tests executed; two failed because replacement 
handlers received no callbacks, while the built-in ownership control passed.
   - `./mvnw -B -ntp -pl :shenyu-web -am clean install 
-Dmaven.javadoc.skip=true`: **BUILD SUCCESS** across 12 modules on Java 17. 
**985 tests: 984 passed, 0 failures, 0 errors, 1 skipped**. The skip is the 
existing `@Disabled` `UpstreamCheckUtilsTest.testSocketConnect`; all 10 added 
tests passed.
   - Checkstyle: zero violations across all 12 modules. Apache RAT: zero 
unapproved licenses. `git diff --check` passed.
   - Completed local self-review before committing, including handler 
ownership, callback routing, activation ordering and test cleanup; no 
actionable findings remained. This is not independent or maintainer approval.
   - Loader tests exercise the activation boundary with supplied loader results 
and a real subscriber; the removal test mocks the filesystem loader result. The 
unrelated full reactor and deployed JAR-replacement E2E were not run.
   
   Make sure that:
   
   - [x] You have read the [contribution 
guidelines](https://shenyu.apache.org/community/contributor-guide).
   - [x] You submit test cases (unit or integration tests) that back your 
changes.
   - [ ] Your local test passed `./mvnw clean install 
-Dmaven.javadoc.skip=true`. The affected modules and dependencies passed the 
scoped command above; the full reactor was not run.
   


-- 
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