yangjj-iso opened a new pull request, #7556:
URL: https://github.com/apache/shenyu/pull/7556

   Fixes #7468.
   
   Namespace config imports compared every row with the database snapshot taken 
before the import. Repeated business keys in the same archive could therefore 
be inserted twice or fail later at a database constraint. Keep the duplicate 
indexes current after successful inserts in the eight affected import services.
   
   Selectors, rules and upstreams check their remapped target IDs. Duplicate 
selectors and proxy selectors reuse the first target record, and duplicate 
discoveries reuse the first imported handler mapping so subsequent upstream 
rows deduplicate against the same handler. Existing selector/proxy-selector 
duplicates in the database retain the first ID in the snapshot. Existing 
matching rules and duplicate error messages are preserved, including dictionary 
matching by type/name.
   
   Validation:
   
   - 20 regression scenarios cover all eight services, existing database 
records, duplicate rows within an import, remapped aliases, distinct keys, 
zero-row inserts, and discovery-to-upstream handler references.
   - Before the fix, all eight batch-duplicate scenarios failed (16 scenarios 
total, 8 assertion failures, no errors).
   - 174 related Admin tests pass, with no failures, errors or skipped tests. 
Checkstyle and Apache RAT also pass for the selected reactor.
   
   ```sh
   ./mvnw -B -ntp -pl shenyu-admin -am \
     
-Dtest=ConfigsImportDuplicateTest,SelectorServiceTest,RuleServiceTest,MetaDataServiceTest,AppAuthServiceTest,ShenyuDictServiceTest,ProxySelectorServiceTest,ProxySelectorServiceImplTest,DiscoveryServiceImplTest,DiscoveryUpstreamServiceTest,ConfigsServiceTest,ConfigsExportImportControllerTest
 \
     -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false \
     -Djacoco.skip=true -Dmaven.javadoc.skip=true test apache-rat:check
   ```
   
   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`.
   
   Validation was scoped to the Admin import services and their Maven 
dependencies; the full repository build and deployed ZIP-import end-to-end 
suite were 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