Skip to content

Conversation

@ly109974
Copy link
Contributor

#15002 fix resource delete bug

Copy link
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

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

This is not a bug.The resource center uses third-party storage, and DS can not control users to delete files from the third party.

@ly109974 ly109974 changed the title fix resource delete bug [Bug] [Resource] fix resource delete bug Oct 11, 2023
@ly109974
Copy link
Contributor Author

This is not a bug.The resource center uses third-party storage, and DS can not control users to delete files from the third party.

However, online process references should not be able to delete resources directly

@codecov-commenter
Copy link

codecov-commenter commented Oct 12, 2023

Codecov Report

Merging #15003 (8301afa) into dev (b532fe5) will decrease coverage by 0.01%.
The diff coverage is 30.43%.

❗ Current head 8301afa differs from pull request most recent head fa7ccf9. Consider uploading reports for the commit fa7ccf9 to get more accurate results

@@             Coverage Diff              @@
##                dev   #15003      +/-   ##
============================================
- Coverage     38.88%   38.88%   -0.01%     
- Complexity     4610     4611       +1     
============================================
  Files          1236     1236              
  Lines         43449    43472      +23     
  Branches       4809     4815       +6     
============================================
+ Hits          16897    16903       +6     
- Misses        24680    24694      +14     
- Partials       1872     1875       +3     
Files Coverage Δ
...api/service/impl/ProcessDefinitionServiceImpl.java 35.48% <ø> (ø)
...er/api/service/impl/TaskDefinitionServiceImpl.java 46.09% <100.00%> (+0.07%) ⬆️
...e/dolphinscheduler/common/constants/Constants.java 75.00% <ø> (ø)
...he/dolphinscheduler/dao/entity/TaskDefinition.java 27.90% <0.00%> (-3.68%) ⬇️
...heduler/api/service/impl/ResourcesServiceImpl.java 42.65% <35.29%> (-0.15%) ⬇️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

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

28.2% 28.2% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@zhuangchong zhuangchong added this to the 3.2.1 milestone Oct 12, 2023
@zhuangchong zhuangchong added 3.2.1 improvement make more easy to user or prompt friendly labels Oct 12, 2023
@zhuangchong zhuangchong merged commit d6a9006 into apache:dev Oct 12, 2023
@zhuangchong
Copy link
Contributor

It is very necessary to check whether deleting resources in the resource center are used by online tasks.

Comment on lines +175 to +189
SELECT
<include refid="baseSqlV2">
<property name="alias" value="td"/>
</include>
FROM t_ds_process_definition as pd
JOIN t_ds_process_task_relation as ptr on pd.code = ptr.process_definition_code and pd.version = ptr.process_definition_version
JOIN t_ds_task_definition as td on ptr.post_task_code = td.code and ptr.post_task_version = td.version
<where>
<if test="releaseState != null">
and pd.release_state = #{releaseState}
</if>
<if test="taskFlag != null">
and td.flag = #{taskFlag}
</if>
</where>
Copy link
Member

Choose a reason for hiding this comment

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

This can lead to serious performance accidents in production environments with large amounts of data. We should not do this way... cc @zhuangchong

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @SbloodyS. I will revert this PR.

zhuangchong added a commit that referenced this pull request Oct 12, 2023
zhuangchong added a commit that referenced this pull request Oct 12, 2023
xdu-chenrj pushed a commit to xdu-chenrj/dolphinscheduler that referenced this pull request Oct 30, 2023
xdu-chenrj pushed a commit to xdu-chenrj/dolphinscheduler that referenced this pull request Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.2.1 backend improvement make more easy to user or prompt friendly ready-to-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants