[Improvement][api] optimize api controller with AuthUtil#5422
[Improvement][api] optimize api controller with AuthUtil#5422haydenzhourepo wants to merge 18 commits intoapache:devfrom
Conversation
|
CI is not triggered, can you resubmit the changes to trigger CI, (just a little change is needed) |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev #5422 +/- ##
============================================
+ Coverage 45.21% 48.65% +3.44%
- Complexity 3395 3889 +494
============================================
Files 538 599 +61
Lines 23053 24307 +1254
Branches 2687 2782 +95
============================================
+ Hits 10423 11827 +1404
+ Misses 11698 11395 -303
- Partials 932 1085 +153 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/AuthUtil.java
Outdated
Show resolved
Hide resolved
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/AuthUtil.java
Show resolved
Hide resolved
...uler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AccessTokenController.java
Outdated
Show resolved
Hide resolved
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/AuthUtil.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/dolphinscheduler/api/controller/AlertPluginInstanceController.java
Outdated
Show resolved
Hide resolved
...ler-api/src/main/java/org/apache/dolphinscheduler/api/controller/DataAnalysisController.java
Show resolved
Hide resolved
...duler-api/src/main/java/org/apache/dolphinscheduler/api/controller/DataSourceController.java
Outdated
Show resolved
Hide resolved
...heduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
Outdated
Show resolved
Hide resolved
...pi/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
Show resolved
Hide resolved
...pi/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
Outdated
Show resolved
Hide resolved
...eduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
Show resolved
Hide resolved
...eduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
Show resolved
Hide resolved
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/AuthUtils.java
Outdated
Show resolved
Hide resolved
...rc/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java
Show resolved
Hide resolved
|
SonarCloud Quality Gate failed.
|
...uler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AccessTokenController.java
Show resolved
Hide resolved
|
Sorry, I think that if this pr just reduce the declared If you want to reduce parameter passing, I would accept to use this implementation to achieve. https://www.programmersought.com/article/93593446439/ It is my personal opinion and does not represent the community, just for reference. |
|
yes, we will use a threadlocal to store the loginuser info ultimately, i think there are too much changes if do this step now, many unit test related to it already。 so i thought split the changes by steps will be better for give more stable for project。 |
|
This pull request has been automatically marked as stale because it has not had recent activity for 120 days. It will be closed in 7 days if no further activity occurs. |
|
This pull request has been closed because it has not had recent activity. You could reopen it if you try to continue your work, and anyone who are interested in it are encouraged to continue work on this pull request. |
Purpose of the pull request
Remove loginUser parameter in Controller's Handler, as described in #5339
Brief change log
Verify this pull request
This pull request is already covered by existing tests, such as (please describe tests).