github-actions[bot] commented on issue #17175:
URL: 
https://github.com/apache/dolphinscheduler/issues/17175#issuecomment-2875790232

   ### 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
   
   At `CosStorageOperatorFactory.java`
   ```
   
       private CosStorageProperties getCosStorageProperties() {
          // Here we get the configuration based on the 
TENCENT_CLOUD_COS_PROPERTY_PREFIX prefix, but the RESOURCE_UPLOAD_PATH below is 
not this prefix, which causes the basic path configuration to fail to take 
effect, and it is always /dolphinscheduler
           Map<String, String> cosPropertiesMap =
                   
PropertyUtils.getByPrefix(CosStorageConstants.TENCENT_CLOUD_COS_PROPERTY_PREFIX);
   
           return CosStorageProperties.builder()
                   
.region(cosPropertiesMap.get(CosStorageConstants.TENCENT_CLOUD_COS_REGION))
                   
.accessKeyId(cosPropertiesMap.get(CosStorageConstants.TENCENT_CLOUD_ACCESS_KEY_ID))
                   
.accessKeySecret(cosPropertiesMap.get(CosStorageConstants.TENCENT_CLOUD_ACCESS_KEY_SECRET))
                   
.bucketName(cosPropertiesMap.get(CosStorageConstants.TENCENT_CLOUD_COS_BUCKET_NAME))
                   .resourceUploadPath(
                           
cosPropertiesMap.getOrDefault(StorageConstants.RESOURCE_UPLOAD_PATH,
                                   
CosStorageConstants.DEFAULT_COS_RESOURCE_UPLOAD_PATH))
                   .build();
       }
   ```
   
   ### What you expected to happen
   
   COS Resource Get resourceUploadPath is incorrect
   
   ### How to reproduce
   
   Like this
   ```
         Map<String, String> cosPropertiesMap =
                   
PropertyUtils.getByPrefix(CosStorageConstants.TENCENT_CLOUD_COS_PROPERTY_PREFIX);
   
           return CosStorageProperties.builder()
                   
.region(cosPropertiesMap.get(CosStorageConstants.TENCENT_CLOUD_COS_REGION))
                   
.accessKeyId(cosPropertiesMap.get(CosStorageConstants.TENCENT_CLOUD_ACCESS_KEY_ID))
                   
.accessKeySecret(cosPropertiesMap.get(CosStorageConstants.TENCENT_CLOUD_ACCESS_KEY_SECRET))
                   
.bucketName(cosPropertiesMap.get(CosStorageConstants.TENCENT_CLOUD_COS_BUCKET_NAME))
                   //This is modified to not get from prefix
                   .resourceUploadPath(
                           
PropertyUtils.getString(StorageConstants.RESOURCE_UPLOAD_PATH,
                                   
CosStorageConstants.DEFAULT_COS_RESOURCE_UPLOAD_PATH))
                   .build();
       }
   ```
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   dev
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to