Skip to content

Extend plugin test coverage for newer framework versions#801

Merged
wu-sheng merged 18 commits intomainfrom
extend-plugin-versions-and-skills
Apr 8, 2026
Merged

Extend plugin test coverage for newer framework versions#801
wu-sheng merged 18 commits intomainfrom
extend-plugin-versions-and-skills

Conversation

@wu-sheng
Copy link
Copy Markdown
Member

@wu-sheng wu-sheng commented Apr 8, 2026

Summary

  • Extend test coverage for 7 existing plugins to support newer library versions
  • Fix MongoDB 4.x plugin to support driver 4.9+ (db.bind_vars extraction broken by removed classes)
  • Enhance test/plugin/run.sh to support extra Maven properties per version in support-version.list
  • Add 4 new JDK 8/17 test scenarios for major version changes
  • Add Claude Code skills and documentation
  • Upgrade zookeeper from 3.4 to 3.7 in spring-kafka test scenarios (arm64 support)

Plugin Version Extensions (source-verified compatible)

Plugin Previous Max Extended To Verified
MySQL 8.0.19 8.4.0, 9.0-9.6 Local
MariaDB 2.6.0 2.7.12 Local
MongoDB 4.x 4.1.0 4.2-4.10 (code fix for 4.9+) Local+CI
Feign 9.5.1 10.12, 11.10, 12.1 Local
Undertow 2.0.27 2.1.8, 2.2.37, 2.3.18 Local
GraphQL 17.0 18.7, 19.11, 20.9-24.1 Local
Spring Kafka 2.3.10 2.4-2.9, 3.1-3.3 Local

Code Fixes

MongoDB 4.9+ db.bind_vars extraction

MongoDB driver 4.9 removed InsertOperation, DeleteOperation, UpdateOperation. MongoOperationHelper imported them causing NoClassDefFoundError at class load time which silently broke ALL db.bind_vars extraction. Fix: Class.forName check + isolated LegacyOperationHelper (only loaded when legacy classes exist).

MySQL 9.x test scenario

New scenario with com.mysql:mysql-connector-j artifact. Fixed timezone (CST to UTC), added allowPublicKeyRetrieval, updated driver class, updated expectedData for 8.4+ behavior (no internal SHOW CREATE PROCEDURE query).

run.sh enhancement

support-version.list now supports format: version[,key=value[,key=value...]]. Extra properties passed as -D flags to Maven. Enables different framework versions to use different dependency versions without separate scenarios.

Spring Kafka test fixes

  • Removed hardcoded kafka-clients dependency (let spring-kafka pull matching version transitively)
  • Spring Kafka 2.7 needs Spring Boot 2.5 (2.6+ autoconfigure requires CommonErrorHandler from spring-kafka 2.8)
  • Spring Kafka 3.x uses Spring Boot 3.2 BOM (Spring Framework 6.1 required by spring-kafka 3.1+)
  • javax.annotation to jakarta.annotation for JDK 17 scenarios
  • componentId 14 to 1 (Tomcat in Spring Boot 3.x), operation names with context path prefix
  • Upgraded zookeeper from 3.4 to 3.7 in all spring-kafka scenarios (arm64 support)

New Test Scenarios

Scenario JDK Versions
mysql-9.x-scenario 8 8.4.0, 9.0-9.6
graphql-20plus-scenario 17 20.9, 21.5, 22.4, 23.1, 24.1
spring-kafka-3.x-scenario 17 3.1.4, 3.2.10, 3.3.7
undertow-2.3.x-scenario 17 2.3.18.Final

Source-verified: ready to extend (next PRs)

Plugin Can Extend To Notes
PostgreSQL 42.7+ All target classes (PgConnection, PgStatement, etc.) exist with same signatures
OkHttp 4.x 4.12+ All classes (RealCall, AsyncCall, Callback) unchanged
Dubbo 3.x 3.3+ MonitorFilter.invoke still exists (marked @deprecated, may be removed in 4.x)

Test plan

  • mariadb-scenario: all 9 versions passed locally
  • feign-scenario: all 9 versions passed locally
  • undertow-scenario: all 5 versions passed locally
  • undertow-2.3.x-scenario: passed locally (JDK 17)
  • graphql-16plus-scenario: all 4 versions passed locally
  • graphql-20plus-scenario: all 5 versions passed locally (JDK 17)
  • mysql-9.x-scenario: all 8 versions passed locally
  • spring-kafka-2.3.x-scenario: all 7 versions (2.3-2.9) passed locally
  • spring-kafka-3.x-scenario: all 3 versions (3.1, 3.2, 3.3) passed locally
  • mongodb-4.x-scenario: CI verification (code fix for 4.9+)

…de Code skills

- Extend MySQL plugin support to Connector/J 8.4.0 and 9.x (9.0-9.6)
- Extend MariaDB plugin test to 2.7.12
- Extend MongoDB 4.x plugin test to 4.2-4.10
- Extend Feign plugin test to 10.12, 11.10, 12.1
- Extend Undertow plugin test to 2.1.8, 2.2.37, 2.3.18
- Extend GraphQL plugin test to 18.7, 19.11 (JDK 8) and 20.9-24.1 (JDK 17)
- Extend Spring Kafka plugin test to 2.4-2.9 and 3.0-3.3
- Add new test scenarios for JDK 17: graphql-20plus, spring-kafka-3.x, undertow-2.3.x
- Add new test scenario for MySQL Connector/J 9.x (com.mysql:mysql-connector-j artifact)
- Add Claude Code skills for plugin development (/new-plugin) and building (/compile)
- Add Claude Skills documentation page
@wu-sheng wu-sheng added enhancement New feature or request plugin labels Apr 8, 2026
@wu-sheng wu-sheng added this to the 9.7.0 milestone Apr 8, 2026
wu-sheng added 3 commits April 8, 2026 14:09
… path references

- Replace hardcoded spring-kafka-2.3.x-scenario URL in CaseController.java
- Update serviceName, parentService refs, and operation name paths in expectedData.yaml
- Fix operation names to include context path prefix (Spring Boot 3.x behavior)
- spring-kafka-3.x: fix all remaining 2.3.x references in source code,
  expectedData.yaml (serviceName, parentService, URLs, operation names)
- mongodb-4.x: skip 4.9.1 (flaky health check assertion), keep 4.10.2
MongoDB driver 4.9+ changed internal operation class filter/document
accessor methods, causing MongoOperationHelper.getTraceParam() to
return empty. Tracing and span creation still work correctly, but
db.bind_vars tags are lost. This needs a code fix in a follow-up PR.
@wu-sheng wu-sheng force-pushed the extend-plugin-versions-and-skills branch from d8e5145 to 9ff281e Compare April 8, 2026 06:33
wu-sheng added 14 commits April 8, 2026 14:56
MongoDB driver 4.9 removed InsertOperation, DeleteOperation, UpdateOperation
classes. MongoOperationHelper imported them, causing NoClassDefFoundError at
class load time which silently broke all db.bind_vars extraction.

Fix: use Class.forName check to detect legacy classes at startup, isolate
legacy imports into LegacyOperationHelper (only loaded when classes exist).
For 4.9+, all write operations go through MixedBulkWriteOperation which
the plugin already handles via getWriteRequests().
Spring Kafka 2.4+ requires kafka-clients 2.4+, but the test scenario
uses kafka-clients 2.3.1 (Consumer.committed(Set) NoSuchMethodError).
Extending 2.4+ needs separate scenarios with version-matched kafka-clients.

Also add source code cloning workflow and import-time failure check to
the plugin development skill.
The test scenario hardcoded kafka-clients at 2.3.1, but spring-kafka 2.4+
requires matching kafka-clients versions (2.4+, 2.5+, etc.). Fix by removing
the explicit kafka-clients dependency and letting spring-kafka's transitive
dependency pull the correct version automatically.
Spring Kafka 3.1+ requires Spring Framework 6.1 (ClassFormatException),
but this scenario uses Spring Boot 3.0.13 (Spring Framework 6.0).
3.1+ testing needs a separate scenario with Spring Boot 3.1+.
support-version.list now supports format: version[,key=value[,key=value...]]
Extra properties are passed as -D flags to Maven. This allows different
framework versions to use different dependency versions (e.g., Spring Boot).

Example: 2.7.14,spring.boot.version=2.7.18

Use this to extend Spring Kafka test coverage:
- 2.3.x scenario: 2.3-2.6 (default Spring Boot 2.3), 2.7-2.9 (Spring Boot 2.7)
- 3.x scenario: 3.0 (Spring Boot 3.0), 3.1-3.3 (matching Spring Boot 3.1-3.3)
Spring Kafka 3.1+ requires Spring Framework 6.1 (ClassFormatException).
Spring Boot 3.1 still uses Spring Framework 6.0, so Spring Boot 3.2+ BOM
is needed to manage consistent 6.1 versions.

Verified locally: 3.1.4, 3.2.10, 3.3.7 all passed.
…requires CommonErrorHandler from spring-kafka 2.8)
@wu-sheng wu-sheng merged commit bc1bc3e into main Apr 8, 2026
210 checks passed
@wu-sheng wu-sheng deleted the extend-plugin-versions-and-skills branch April 8, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants