Skip to content

[Bug] Task could not get resources when resource file was deleted and re-uploaded again#13593

Closed
QuantumXiecao wants to merge 1 commit intoapache:devfrom
QuantumXiecao:dev-resource-related-improvements
Closed

[Bug] Task could not get resources when resource file was deleted and re-uploaded again#13593
QuantumXiecao wants to merge 1 commit intoapache:devfrom
QuantumXiecao:dev-resource-related-improvements

Conversation

@QuantumXiecao
Copy link
Copy Markdown
Contributor

@QuantumXiecao QuantumXiecao commented Feb 21, 2023

Purpose of the pull request

Task could not get resources when resource file was deleted and re-uploaded again.

Related Issure:

close #13583

Brief change log

  1. Task could not get resources when resource file was deleted and re-uploaded again. Same file was attached to task and deleted and then re-uploaded with same name again, which should been obtained by related task properly.
  2. Shell command log fix.
    Before fixing:
    1
    After fixing:
    2

Before fixing:
null
Delete resource failed when related process/task info already removed.
After fixing: We could delete resource normally when related process/task info already removed.

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:
yes

(or)

If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

Copy link
Copy Markdown
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.

Please associate your issue.

@QuantumXiecao
Copy link
Copy Markdown
Contributor Author

image
@caishunfeng @SbloodyS @zhuangchong Could you please help me to label this PR as bug?

@QuantumXiecao
Copy link
Copy Markdown
Contributor Author

Please associate your issue.

Related Issure: #13583
I just redo all actions like this issue, and got one different bug.
Task instance with resource file re-uploaded which was removed before could not obtain the file normally.
And there are some small related bugs.

@SbloodyS
Copy link
Copy Markdown
Member

Related Issure: #13583 I just redo all actions like this issue, and got one different bug. Task instance with resource file re-uploaded which was removed before could not obtain the file normally. And there are some small related bugs.

We've refactored the resources center in #12076. So the behavior between version 3.1.X and dev are quite huge. You should coding base on the 3.1.4-prepare branch and push it to 3.1.4-prepare branch if you want to fix it.

@QuantumXiecao
Copy link
Copy Markdown
Contributor Author

@SbloodyS ok

@sonarqubecloud
Copy link
Copy Markdown

SonarCloud Quality Gate failed.    Quality Gate failed

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

14.3% 14.3% Coverage
1.9% 1.9% Duplication

@Radeity
Copy link
Copy Markdown
Member

Radeity commented Feb 21, 2023

Hi, @QuantumXiecao I just find that some fixes in this pr also work for dev, you can separate them and create another pr base on dev. In addition, can we disallow resource deletion when it binds to a task whether the task is online or offline? cc @SbloodyS

@SbloodyS
Copy link
Copy Markdown
Member

In addition, can we disallow resource deletion when it binds to a task whether the task is online or offline?

In my personal opinion, we can't prevent such operations because users can delete them from third-party storage. I think we can throw an error message to tell the user that the file cannot be found instead of NPE during task execution. WDYT?

@Radeity
Copy link
Copy Markdown
Member

Radeity commented Feb 21, 2023

In my personal opinion, we can't prevent such operations because users can delete them from third-party storage. I think we can throw an error message to tell the user that the file cannot be found instead of NPE during task execution. WDYT?

Good suggestion, agree with you : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [dolphinscheduler-master] Master can't release the tast to worker

3 participants