You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2023/01/10 07:43:15 UTC
[GitHub] [dolphinscheduler] ro4 opened a new issue, #13365: [Bug] [Reources - File Manage] Rename (update) a file will override the filename with the input name(alias) that the user submitted
ro4 opened a new issue, #13365:
URL: https://github.com/apache/dolphinscheduler/issues/13365
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
Rename (update) a file will override the filename with the input name(alias) that the user submitted
### What you expected to happen
The filename should not be overridden by name (alias). I have read the source code, filename needs to obtain from `MultipartFile#getOriginalFilename` method in the `ResourcesServiceImpl#updateResource`, just like `ResourcesServiceImpl#createResource` method.
I'm not sure if this is intended or just a bug, but it's kind of weird to me.
### How to reproduce
1. Upload a new file `xxx.jar` with the name(alias) `xxx-1.jar`.
2. Check page response, alias : "xxx-1.jar" filename : "xxx.jar".
3. Rename `xxx-1.jar` to `xxx-2.jar`.
4. Check page response, alias : "xxx-2.jar" filename : "xxx-2.jar". (Filename override by alias)
### Anything else
This can be fixed easily by changing
```
resource.setAlias(name);
resource.setFileName(name);
resource.setFullName(fullName);
resource.setDescription(desc);
resource.setUpdateTime(now);
if (file != null) {
resource.setSize(file.getSize());
}
```
to
```
resource.setAlias(name);
resource.setFullName(fullName);
resource.setDescription(desc);
resource.setUpdateTime(now);
if (file != null) {
resource.setSize(file.getSize());
resource.setFileName(file.getOriginalFilename());
}
```
If this is a bug, I'd like to submit a PR to fix it.
Have a nice day.
### Version
3.0.x
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] SbloodyS commented on issue #13365: [Bug] [Resources - File Manage] Rename (update) a file will override the filename with the input name(alias) that the user submitted
Posted by GitBox <gi...@apache.org>.
SbloodyS commented on issue #13365:
URL: https://github.com/apache/dolphinscheduler/issues/13365#issuecomment-1379920428
> Hi, @SbloodyS, i just wonder that after refactoring the resource center, ds doesn't support authority management of resource any more?
The permission management remains the same. Do you have any problems with this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] ro4 commented on issue #13365: [Bug] [Resources - File Manage] Rename (update) a file will override the filename with the input name(alias) that the user submitted
Posted by GitBox <gi...@apache.org>.
ro4 commented on issue #13365:
URL: https://github.com/apache/dolphinscheduler/issues/13365#issuecomment-1379918741
> We have refactored the resources center in dev branch. Could you please check whether this problem still exists? @ro4
I have built it from dev branch and ran it in standalone mode locally, it looks normal now since the `createResource` method also use `@RequestParam(value = "name") String alias` as the filename.
As long as the `createResource` and the `updateResource` deal with the filename the same way, there is no issue here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] SbloodyS commented on issue #13365: [Bug] [Resources - File Manage] Rename (update) a file will override the filename with the input name(alias) that the user submitted
Posted by GitBox <gi...@apache.org>.
SbloodyS commented on issue #13365:
URL: https://github.com/apache/dolphinscheduler/issues/13365#issuecomment-1378319537
We have refactored the resources center in dev branch. Could you please check whether this problem still exists? @ro4
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] Radeity commented on issue #13365: [Bug] [Resources - File Manage] Rename (update) a file will override the filename with the input name(alias) that the user submitted
Posted by GitBox <gi...@apache.org>.
Radeity commented on issue #13365:
URL: https://github.com/apache/dolphinscheduler/issues/13365#issuecomment-1380124270
> The permission management remains the same. Do you have any problems with this?
It seems that current resource permission authority change from user granularity to tenant granularity? If yes, we don't need to support authorize resource in user management, and we should better remove these parts of code. Now it's inconsistent, when we query user's authorized files, it should return corresponding tenant's authorized file, however, in fact, it returns datas in deprecated resource tables. Are there any plans to clean that parts of code?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #13365: [Bug] [Reources - File Manage] Rename (update) a file will override the filename with the input name(alias) that the user submitted
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #13365:
URL: https://github.com/apache/dolphinscheduler/issues/13365#issuecomment-1376850327
Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
* In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
* If you haven't received a reply for a long time, you can [join our slack](https://s.apache.org/dolphinscheduler-slack) and send your question to channel `#troubleshooting`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] Radeity commented on issue #13365: [Bug] [Resources - File Manage] Rename (update) a file will override the filename with the input name(alias) that the user submitted
Posted by GitBox <gi...@apache.org>.
Radeity commented on issue #13365:
URL: https://github.com/apache/dolphinscheduler/issues/13365#issuecomment-1378593935
Hi, @SbloodyS, i just wonder that after refactoring the resource center, ds doesn't support authority management of resource any more? If not support, we should remove relative codes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] ro4 closed issue #13365: [Bug] [Resources - File Manage] Rename (update) a file will override the filename with the input name(alias) that the user submitted
Posted by GitBox <gi...@apache.org>.
ro4 closed issue #13365: [Bug] [Resources - File Manage] Rename (update) a file will override the filename with the input name(alias) that the user submitted
URL: https://github.com/apache/dolphinscheduler/issues/13365
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] SbloodyS commented on issue #13365: [Bug] [Resources - File Manage] Rename (update) a file will override the filename with the input name(alias) that the user submitted
Posted by GitBox <gi...@apache.org>.
SbloodyS commented on issue #13365:
URL: https://github.com/apache/dolphinscheduler/issues/13365#issuecomment-1379921961
> > We have refactored the resources center in dev branch. Could you please check whether this problem still exists? @ro4
>
> I have built it from dev branch and ran it in standalone mode locally, it looks normal now since the `createResource` method also use `@RequestParam(value = "name") String alias` as the filename.
>
> As long as the `createResource` and the `updateResource` deal with the filename the same way, there is no issue here.
Glad to hear that👍 We plan to release it in 3.2.0-release.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org