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): remove headers from model download api #1797

Merged

Conversation

goldenxinxing
Copy link
Contributor

@goldenxinxing goldenxinxing commented Feb 7, 2023

Description

Unified the upload/download api for model and dataset:

  1. dataset
    changed param from 'part_name' to 'partName'
  2. model
    changed headers from 'X-SW-DOWNLOAD-TYPE','X-SW-DOWNLOAD-OBJECT-NAME','X-SW-DOWNLOAD-OBJECT-PATH','X-SW-DOWNLOAD-OBJECT-HASH' to 'desc','partName','path','signature' and the type from header to param.
  3. Change upload id from String to Long

Modules

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

Checklist

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

@goldenxinxing goldenxinxing added invalid This doesn't seem right e2e labels Feb 7, 2023
@codecov
Copy link

codecov bot commented Feb 7, 2023

Codecov Report

Merging #1797 (7653526) into main (3f18410) will decrease coverage by 0.02%.
The diff coverage is 90.00%.

@@             Coverage Diff              @@
##               main    #1797      +/-   ##
============================================
- Coverage     82.14%   82.13%   -0.02%     
+ Complexity     1967     1966       -1     
============================================
  Files           355      355              
  Lines         18989    18989              
  Branches       1037     1038       +1     
============================================
- Hits          15599    15596       -3     
- Misses         2957     2958       +1     
- Partials        433      435       +2     
Flag Coverage Δ
controller 73.94% <88.88%> (-0.02%) ⬇️
standalone 90.19% <100.00%> (-0.01%) ⬇️
unittests 90.19% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
client/starwhale/core/dataset/copy.py 96.77% <ø> (ø)
...whale/mlops/api/protocol/upload/UploadRequest.java 100.00% <ø> (ø)
.../ai/starwhale/mlops/domain/model/ModelService.java 66.66% <50.00%> (-0.20%) ⬇️
client/starwhale/base/bundle_copy.py 97.51% <100.00%> (-0.09%) ⬇️
...java/ai/starwhale/mlops/api/DatasetController.java 81.25% <100.00%> (+0.29%) ⬆️
...n/java/ai/starwhale/mlops/api/ModelController.java 90.90% <100.00%> (+0.28%) ⬆️
...e/mlops/domain/dataset/upload/DatasetUploader.java 77.77% <100.00%> (ø)
.../mlops/domain/dataset/upload/HotDatasetHolder.java 100.00% <100.00%> (ø)
...n/java/ai/starwhale/mlops/datastore/DataStore.java 86.88% <0.00%> (-0.66%) ⬇️

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

@jialeicui
Copy link
Contributor

Should the upload interface match the download?

@goldenxinxing goldenxinxing force-pushed the fix/model_pull_file_api_more_restful branch from 830d942 to d4b8354 Compare February 7, 2023 10:39
@goldenxinxing goldenxinxing self-assigned this Feb 7, 2023
@goldenxinxing goldenxinxing force-pushed the fix/model_pull_file_api_more_restful branch 2 times, most recently from 81bd022 to 815a754 Compare February 8, 2023 02:10
@goldenxinxing
Copy link
Contributor Author

Should the upload interface match the download?

done

@goldenxinxing goldenxinxing force-pushed the fix/model_pull_file_api_more_restful branch 3 times, most recently from 4cd2a74 to f58ae51 Compare February 8, 2023 06:34
@goldenxinxing goldenxinxing force-pushed the fix/model_pull_file_api_more_restful branch from f58ae51 to 83bc016 Compare February 8, 2023 06:35
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

Copy link
Contributor

@jialeicui jialeicui left a comment

Choose a reason for hiding this comment

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

LGTM

@jialeicui jialeicui merged commit 57e6cac into star-whale:main Feb 9, 2023
@goldenxinxing goldenxinxing deleted the fix/model_pull_file_api_more_restful branch April 27, 2023 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
break-change 💔 break change e2e invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants