feat: add Jakarta EE Servlet 6.0 adapter module (#2998)#3618
feat: add Jakarta EE Servlet 6.0 adapter module (#2998)#3618EvanYao826 wants to merge 63 commits into
Conversation
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
…uster-server-envoy-rls module (alibaba#2921) Bumps [snakeyaml](https://bitbucket.org/snakeyaml/snakeyaml) from 1.26 to 1.32. - [Commits](https://bitbucket.org/snakeyaml/snakeyaml/branches/compare/snakeyaml-1.32..snakeyaml-1.26) --- updated-dependencies: - dependency-name: org.yaml:snakeyaml dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#2842) * opensergo.sdk.version: 0.1.0-alpha * Current supported strategies: RateLimitStrategy, ThrottlingStrategy, CircuitBreakerStrategy Signed-off-by: Eric Zhao <sczyh16@gmail.com>
* Rename: DefaultDegradeSlot -> DefaultCircuitBreakerSlot * Refine DefaultCircuitBreakerRuleManager * Add test cases Signed-off-by: Eric Zhao <sczyh16@gmail.com>
…he-dubbo (alibaba#2923) Bumps [dubbo](https://github.com/apache/dubbo) from 2.7.3 to 2.7.18. - [Release notes](https://github.com/apache/dubbo/releases) - [Changelog](https://github.com/apache/dubbo/blob/3.1/CHANGES.md) - [Commits](apache/dubbo@dubbo-2.7.3...dubbo-2.7.18) --- updated-dependencies: - dependency-name: org.apache.dubbo:dubbo dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add dockerfile for dashboard with doc update
…atasource-opensergo (alibaba#2965)
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
… 1000 * Rename to ThrottlingController * Improve accuracy: use nanoseconds when necessary and support maxQps threshold > 1000 (i.e. wait < 1ms) Signed-off-by: Eric Zhao <sczyh16@gmail.com>
* fix thread blocked problem of etcd watcher in the previous version of EtcdDataSource, when the flowRules defined in the etcd change and trigger etcd watcher, there will be a following error: 2022-12-07 14:36:03.592 [vertx-blocked-thread-checker] WARN io.vertx.core.impl.BlockedThreadChecker [?:?] - Thread Thread[vert.x-eventloop-thread-0,5,main] has been blocked for 2336 ms, time limit is 2000 ms 2022-12-07 14:36:04.592 [vertx-blocked-thread-checker] WARN io.vertx.core.impl.BlockedThreadChecker [?:?] - Thread Thread[vert.x-eventloop-thread-0,5,main] has been blocked for 3337 ms, time limit is 2000 ms 2022-12-07 14:36:05.592 [vertx-blocked-thread-checker] WARN io.vertx.core.impl.BlockedThreadChecker [?:?] - Thread Thread[vert.x-eventloop-thread-0,5,main] has been blocked for 4337 ms, time limit is 2000 ms 2022-12-07 14:36:06.595 [vertx-blocked-thread-checker] WARN io.vertx.core.impl.BlockedThreadChecker [?:?] - Thread Thread[vert.x-eventloop-thread-0,5,main] has been blocked for 5337 ms, time limit is 2000 ms io.vertx.core.VertxException: Thread blocked at sun.misc.Unsafe.park(Native Method) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1707) at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3334) at java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1742) at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908) at com.htsc.fst.saas.infrastructure.component.EtcdDataSource.readSource(EtcdDataSource.java:92) at com.htsc.fst.saas.infrastructure.component.EtcdDataSource.readSource(EtcdDataSource.java:23) at com.alibaba.csp.sentinel.datasource.AbstractDataSource.loadConfig(AbstractDataSource.java:44) at com.htsc.fst.saas.infrastructure.component.EtcdDataSource.lambda$initWatcher$0(EtcdDataSource.java:74) at com.htsc.fst.saas.infrastructure.component.EtcdDataSource$$Lambda$480/1375681611.accept(Unknown Source) at io.etcd.jetcd.Watch$1.onNext(Watch.java:183) at io.etcd.jetcd.impl.WatchImpl$WatcherImpl.onNext(WatchImpl.java:310) at io.etcd.jetcd.impl.WatchImpl$WatcherImpl$$Lambda$488/2088661957.handle(Unknown Source I guess the reason is : when the watcher hold etcd Client, you can't use etcd Client in the Watch's consumer function. Besides the problem above, use getKeyValue() in the watchEvent can reduce once invoke with etcd server to getting the latest flowRules :) * Update EtcdDataSource.java Add charset adaptation -- accept the suggestion from @LProDreamAll
… macOS aarch64 compile error (alibaba#2993)
…-source (alibaba#2963) * Fix issue to upgrade curator-recipes and related API. * Resolve test failure: ClassNotFoundException of ZooKeeperAdmin. * Remove unused property in pom.
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Signed-off-by: frank-zsy <syzhao1988@126.com>
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
* Support traffic routing capability.
|
I have read and fully agree to the Contributor License Agreement (CLA). |
|
The CLA check failed. Please ensure that your commit email matches your GitHub account email. |
|
@CLAassistant recheck please. I have signed the CLA. |
|
The tests failed on JDK 8 and 11. It is recommended to partially skip them by referencing other v6x components. For example, you can add the <skip.spring.v6x.test>false</skip.spring.v6x.test> configuration, similar to what is done in sentinel-spring-webmvc-v6x-adapter. |
|
@LearningGp Thanks for the feedback! I see two issues:
Will update the PR shortly. |
Add sentinel-web-servlet-jakarta module to support Jakarta EE Servlet
6.0 (Spring Boot 3.x, JDK 17+).
Changes:
- New module: sentinel-adapter/sentinel-web-servlet-jakarta
- All javax.servlet imports replaced with jakarta.servlet
- jakarta.servlet-api 6.0.0 (replacing javax.servlet-api 3.1.0)
- Spring Boot 3.2.0 for tests (replacing 1.5.17.RELEASE)
- Added new module to sentinel-adapter/pom.xml
Usage:
<dependency>
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-web-servlet-jakarta</artifactId>
</dependency>
Fixes alibaba#2998
b61ce9c to
4d21d48
Compare
|
@LearningGp Thanks for the feedback!
I'll push the rebased commits shortly. |
|
@LearningGp Thanks for the review! Both issues have been addressed:
Please let me know if there are any other concerns! |
|
I have read the CLA Document and I hereby sign the CLA |
4d21d48 to
6118ca8
Compare
|
Fixed the CLA issue - updated committer email to match my GitHub account email (2869018789@qq.com). Please recheck. |
6118ca8 to
ee172b8
Compare
|
@LearningGp Fixed both issues:
|
Moved sentinel-web-servlet-jakarta into a jdk17-plus profile so CI on JDK 8 and 11 no longer fails. Set compiler source/target to 17 for the Jakarta module since Spring Boot 3.x requires JDK 17+.
ee172b8 to
14a4b3f
Compare
|
@LearningGp Thanks for the suggestion! I'll add the |
Add sentinel-web-servlet-jakarta module to support Jakarta EE Servlet
6.0 (Spring Boot 3.x, JDK 17+).
Changes:
- New module: sentinel-adapter/sentinel-web-servlet-jakarta
- All javax.servlet imports replaced with jakarta.servlet
- jakarta.servlet-api 6.0.0 (replacing javax.servlet-api 3.1.0)
- Spring Boot 3.2.0 for tests (replacing 1.5.17.RELEASE)
- Added new module to sentinel-adapter/pom.xml
Usage:
<dependency>
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-web-servlet-jakarta</artifactId>
</dependency>
Fixes alibaba#2998
Add Maven profile that activates on JDK 8/11 to set skip.spring.v6x.test=true, preventing test failures in CI where only JDK 8 and 11 are available. Addresses review feedback from @LearningGp.
Remove duplicate sentinel-web-servlet-jakarta module from default modules list. It should only be included via jdk17-plus profile to prevent build failures on JDK 8 and 11. Refs: alibaba#3618
|
@LearningGp Fixed! The issue was a duplicate Changes:
Commit: EvanYao826@4bb45154 |
|
Thanks for the guidance! I've added the |
1 similar comment
|
Thanks for the guidance! I've added the |
Remove accidentally committed local Maven repository path (E:\IDEA\Maven\). Refs: alibaba#3618
|
@LearningGp Updated! Latest changes:
The CI workflow shows |
|
@LearningGp Hi, just following up on this PR. I've addressed all the feedback:
The module now only builds on JDK 17+ via the Is there anything else needed? Happy to make any additional changes. |
|
@maintainer @LearningGp Hi, I've addressed all the feedback and the PR is ready for review: Issues Fixed:
Current Status:
The PR adds a Jakarta EE Servlet 6.0 adapter module (#2998). Could you please review and merge? Thanks! |
|
It seems this PR isn't based on the default 1.8 branch. Please create a new branch from 1.8 and cherry-pick your commits onto it. |
Fixes #2998
Summary
Add sentinel-web-servlet-jakarta module to support Jakarta EE Servlet 6.0 (Spring Boot 3.x, JDK 17+).
Background
Spring Boot 3.x migrated from javax.servlet to jakarta.servlet as part of the Jakarta EE 9+ transition. The existing sentinel-web-servlet module uses javax.servlet-api 3.1.0 and is incompatible with Spring Boot 3.x applications.
Previous PR #3001 attempted this but was closed without merge.
Changes
New module: sentinel-adapter/sentinel-web-servlet-jakarta
Modified: sentinel-adapter/pom.xml
Usage
com.alibaba.csp sentinel-web-servlet-jakartaCompatibility