Skip to content
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

fix(controller): oss list all keys #1256

Merged
merged 1 commit into from
Sep 20, 2022
Merged

Conversation

jialeicui
Copy link
Contributor

@jialeicui jialeicui commented Sep 20, 2022

Description

AWS S3
https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html#API_ListObjectsV2_RequestSyntax

By default the action returns up to 1,000 key names.
The response might contain fewer keys but will never contain more

aliyun oss
https://github.com/aliyun/aliyun-oss-java-sdk/blob/a927e670955350ff78e1d0b58cb21538923ebf83/src/main/java/com/aliyun/oss/model/ListObjectsRequest.java#L158-L170

/**
 * Sets the max objects to return. By default it's 100, the max is 1000.
 * 
 * @param maxKeys
 *            The max objects to return. The max value is 1000.
 */
public void setMaxKeys(Integer maxKeys) {
    if (maxKeys < 0 || maxKeys > MAX_RETURNED_KEYS_LIMIT) {
        throw new IllegalArgumentException(OSSUtils.OSS_RESOURCE_MANAGER.getString("MaxKeysOutOfRange"));
    }

    this.maxKeys = maxKeys;
}

MinIO
MinIO SDK does not have this issue.

Modules

  • UI
  • Controller
  • Agent
  • Client
  • Python-SDK
  • Others

Checklist

  • run code format and lint check
  • add unit test
  • add necessary doc

@codecov
Copy link

codecov bot commented Sep 20, 2022

Codecov Report

Merging #1256 (175ba76) into main (b7a536c) will decrease coverage by 13.00%.
The diff coverage is 43.75%.

@@              Coverage Diff              @@
##               main    #1256       +/-   ##
=============================================
- Coverage     73.79%   60.79%   -13.01%     
- Complexity     1196     1210       +14     
=============================================
  Files           287      225       -62     
  Lines         13312     6349     -6963     
  Branches        646      651        +5     
=============================================
- Hits           9824     3860     -5964     
+ Misses         3268     2267     -1001     
- Partials        220      222        +2     
Flag Coverage Δ
controller 60.79% <43.75%> (+0.17%) ⬆️
standalone ?
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ops/storage/aliyun/StorageAccessServiceAliyun.java 8.57% <0.00%> (-1.43%) ⬇️
...whale/mlops/storage/s3/StorageAccessServiceS3.java 79.09% <87.50%> (+0.78%) ⬆️
...starwhale/mlops/schedule/k8s/K8sTaskScheduler.java 72.81% <0.00%> (-0.72%) ⬇️
client/starwhale/core/dataset/tabular.py
client/starwhale/api/_impl/metric.py
client/starwhale/utils/venv.py
client/starwhale/utils/fs.py
client/starwhale/api/job.py
client/starwhale/base/bundle_copy.py
client/starwhale/base/cloud.py
... and 56 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@anda-ren anda-ren left a comment

Choose a reason for hiding this comment

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

lgtm

@anda-ren anda-ren merged commit c0364cc into star-whale:main Sep 20, 2022
@jialeicui jialeicui deleted the oss-list branch September 20, 2022 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working controller 🏘️
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants