Skip to content

[Improvement][Api] Interface and entity optimization to improve code scalability (#10466).#10468

Merged
lenboo merged 5 commits intoapache:devfrom
hstdream:improve_interface
Jun 16, 2022
Merged

[Improvement][Api] Interface and entity optimization to improve code scalability (#10466).#10468
lenboo merged 5 commits intoapache:devfrom
hstdream:improve_interface

Conversation

@hstdream
Copy link
Copy Markdown
Contributor

@hstdream hstdream commented Jun 16, 2022

close #10466

Purpose of the pull request

To make the interface and entity easier to expand and improve the extensibility

Brief change log

Interface: there are new interface parameters behind. You can use otherparamsjson in the code
Entity: extend entity Dto
Add burying point

Verify this pull request

Add interface parms otherparamsjson

@hstdream hstdream changed the title [Improvement][Api] Interface and entity optimization to improve code … [Improvement][Api] Interface and entity optimization to improve code scalability (#10466). Jun 16, 2022
@SbloodyS
Copy link
Copy Markdown
Member

Hi @hstdream , can you describe why did you want to do that? This may cause ui request error.

@SbloodyS SbloodyS added backend improvement make more easy to user or prompt friendly labels Jun 16, 2022
@hstdream
Copy link
Copy Markdown
Contributor Author

hstdream commented Jun 16, 2022

I think if some new content is added later, the restrictions here are relatively large. UI currently has a child partner to modify

@SbloodyS
Copy link
Copy Markdown
Member

I think if some new content is added later, the restrictions here are relatively large. UI currently has a child partner to modify

We suggest adding a feature to the same pr. It is not necessary to make meaningless changes in advance.

@hstdream
Copy link
Copy Markdown
Contributor Author

Hi @hstdream , can you describe why did you want to do that? This may cause ui request error.

I think if some new content is added later, the restrictions here are relatively large. UI currently has a child partner to modify

@hstdream hstdream changed the title [Improvement][Api] Interface and entity optimization to improve code scalability (#10466). add license. Jun 16, 2022
@hstdream
Copy link
Copy Markdown
Contributor Author

I think if some new content is added later, the restrictions here are relatively large. UI currently has a child partner to modify

We suggest adding a feature to the same pr. It is not necessary to make meaningless changes in advance.

How to operate?

@SbloodyS
Copy link
Copy Markdown
Member

Descirbed what feature you want to implement in the associate issue and develop it in the same branch. Submit this branch to a PR after completion. @hstdream

@caishunfeng
Copy link
Copy Markdown
Contributor

@hstdream please add some detail into pr description, includes Purpose of the pull request, Brief change log, Verify this pull request.
BTW, How does this relate to add license? Please use the right pr title.

@hstdream hstdream changed the title add license. [Improvement][Api] Interface and entity optimization to improve code scalability (#10466). Jun 16, 2022
@hstdream
Copy link
Copy Markdown
Contributor Author

@hstdream please add some detail into pr description, includes Purpose of the pull request, Brief change log, Verify this pull request. BTW, How does this relate to add license? Please use the right pr title.

ok

@lenboo
Copy link
Copy Markdown
Contributor

lenboo commented Jun 16, 2022

Descirbed what feature you want to implement in the associate issue and develop it in the same branch. Submit this branch to a PR after completion. @hstdream

@SbloodyS
Hi SbloodyS, with more and more new functions, there will be more incompatibilities in the API. We hope to fix the interface parameters to solve the problem of version compatibility and make fewer changes to interface parameters.
I think it's necessary to enhance the extensibility of the API.

@SbloodyS
Copy link
Copy Markdown
Member

SbloodyS commented Jun 16, 2022

Descirbed what feature you want to implement in the associate issue and develop it in the same branch. Submit this branch to a PR after completion. @hstdream
@SbloodyS
Hi SbloodyS, with more and more new functions, there will be more incompatibilities in the API. We hope to fix the interface parameters to solve the problem of version compatibility and make fewer changes to interface parameters.
I think it's necessary to enhance the extensibility of the API.

In this case, i think we should create a general issue to describe all APIs that need to be modified. Then create sub issues to associate them. And then create the pr link to the sub issues. WDYT? @lenboo

@hstdream
Copy link
Copy Markdown
Contributor Author

Descirbed what feature you want to implement in the associate issue and develop it in the same branch. Submit this branch to a PR after completion. @hstdream

purpose: to make the interface and entity easier to expand and improve the extensibility

interface: there are new interface parameters behind. You can use otherparamsjson in the code

entity: extend entity

@SbloodyS SbloodyS added this to the 3.0.0-beta-3 milestone Jun 16, 2022
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 16, 2022

Codecov Report

Merging #10468 (3004c47) into dev (720a10a) will decrease coverage by 0.00%.
The diff coverage is 57.89%.

@@             Coverage Diff              @@
##                dev   #10468      +/-   ##
============================================
- Coverage     40.90%   40.90%   -0.01%     
- Complexity     4852     4853       +1     
============================================
  Files           883      885       +2     
  Lines         35972    35982      +10     
  Branches       3991     3991              
============================================
+ Hits          14714    14717       +3     
- Misses        19802    19807       +5     
- Partials       1456     1458       +2     
Impacted Files Coverage Δ
...uler/api/controller/ProcessInstanceController.java 72.09% <ø> (ø)
...dolphinscheduler/api/dto/ProcessDefinitionDto.java 0.00% <0.00%> (ø)
...e/dolphinscheduler/api/dto/ProcessInstanceDto.java 0.00% <0.00%> (ø)
...che/dolphinscheduler/api/python/PythonGateway.java 17.00% <ø> (ø)
...hinscheduler/api/service/impl/BaseServiceImpl.java 89.79% <ø> (ø)
...r/api/service/impl/ProcessInstanceServiceImpl.java 60.10% <ø> (ø)
...api/service/impl/ProcessDefinitionServiceImpl.java 31.14% <62.50%> (+0.38%) ⬆️
...er/api/controller/ProcessDefinitionController.java 45.34% <100.00%> (ø)
...er/master/dispatch/host/assign/RandomSelector.java 77.77% <0.00%> (-5.56%) ⬇️
...e/dolphinscheduler/remote/NettyRemotingClient.java 50.00% <0.00%> (-2.09%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 720a10a...3004c47. Read the comment docs.

@RequestParam(value = "tenantCode", required = true) String tenantCode,
@RequestParam(value = "taskRelationJson", required = true) String taskRelationJson,
@RequestParam(value = "taskDefinitionJson", required = true) String taskDefinitionJson,
@RequestParam(value = "otherParamsJson", required = false) String otherParamsJson,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add this param to the swagger's doc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1655366094749

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the swagger's param. You can take a look at @ApiImplicitParam.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified

@hstdream
Copy link
Copy Markdown
Contributor Author

close #10466

purpose: to make the interface and entity easier to expand and improve the extensibility

interface: there are new interface parameters behind. You can use otherparamsjson in the code

entity: extend entity

@lenboo
Copy link
Copy Markdown
Contributor

lenboo commented Jun 16, 2022

Descirbed what feature you want to implement in the associate issue and develop it in the same branch. Submit this branch to a PR after completion. @hstdream
@SbloodyS
Hi SbloodyS, with more and more new functions, there will be more incompatibilities in the API. We hope to fix the interface parameters to solve the problem of version compatibility and make fewer changes to interface parameters.
I think it's necessary to enhance the extensibility of the API.

In this case, i think we should create a general issue to describe all APIs that need to be modified. Then create sub issues to associate them. And then create the pr link to the sub issues. WDYT? @lenboo

Good idea! But how can we let contributors know this when they modify the code?

@SbloodyS
Copy link
Copy Markdown
Member

Good idea! But how can we let contributors know this when they modify the code?

At present, the issue can only be associated when the committers review the code.

@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 5 Code Smells

50.0% 50.0% Coverage
0.0% 0.0% Duplication

Copy link
Copy Markdown
Contributor

@lenboo lenboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@lenboo lenboo merged commit f3c647d into apache:dev Jun 16, 2022
int releaseState,
String taskRelationJson,
String taskDefinitionJson,
String otherParamsJson,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will fail python API submit function, maybe we should change python integrate test to avoid regression


Map<String, Object> result = processDefinitionService.updateProcessDefinition(loginUser, projectCode, name, code, description, globalParams,
locations, timeout, tenantCode, taskRelationJson, taskDefinitionJson,executionType);
locations, timeout, tenantCode, taskRelationJson, taskDefinitionJson,otherParamsJson, executionType);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why this addition can pass checktyle, i think it is should be a space before otherParamsJson

hstdream added a commit to hstdream/dolphinscheduler that referenced this pull request Jun 23, 2022
…scalability (apache#10466). (apache#10468)

* [Improvement][Api] Interface and entity optimization to improve code scalability (apache#10466).

* [Improvement][Api] Interface and entity optimization to improve code scalability (apache#10466).

* [Improvement][Api] Interface and entity optimization to improve code scalability (apache#10466).

* [Improvement][Api] Interface and entity optimization to improve code scalability (apache#10466).

* fix ut timezone.

Co-authored-by: houshitao <shitaohou@163.com>
@zhongjiajie zhongjiajie modified the milestones: 3.0.0-release, 3.1.0-alpha Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend improvement make more easy to user or prompt friendly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement][Api] Interface and entity optimization to improve code scalability

6 participants