-
Notifications
You must be signed in to change notification settings - Fork 5k
[Bug] [Resource] fix resource delete bug #15003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
SbloodyS
left a comment
There was a problem hiding this 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.
However, online process references should not be able to delete resources directly |
Codecov Report
@@ 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
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
SonarCloud Quality Gate failed.
|
|
It is very necessary to check whether deleting resources in the resource center are used by online tasks. |
| 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> |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
This reverts commit d6a9006.
…che#15020) This reverts commit d6a9006.










#15002 fix resource delete bug