overture-stack / score

Secure Cloud Object REsource: file transfer microservice
https://www.overture.bio/products/score
GNU Affero General Public License v3.0
18 stars 10 forks source link

Auto sync score-client to operate on same storage profile as score-server #378

Open UmmulkiramR opened 10 months ago

UmmulkiramR commented 10 months ago

At the moment, score-client and score-server each operate on a storage profile (azure or s3), and they need to be synced to make sure the correct object storage system is called. If not in sync the uploads/downloads will fail. Users, however, should not have to worry about operating score-client on the right profile. Hence, this change is proposed where score-client will auto-sync itself with the profile of score-server.

As part of this change,

  1. an endpoint (eg. _getStorageProfiles_) will be added to score-server that returns the active profiles it is operating on.
  2. when executing a command, score-client will first make a call to this _getStorageProfiles_ endpoint to get the active profiles.
  3. based on the response of this API call score-client will switch its profile to be the same as score-server.
  4. in order to maintain compatibility with older versions of score-server, in the absence of the _getStorageProfiles_ endpoint score-client will use the existing logic to select the right profile which is defaulting to S3 storage.
  5. the list of storage profiles currently available are azure and s3
  6. the storage profile values score-server is expected to respond with are "azure" for azure or "amazon" for s3.
score_client_server_comm
UmmulkiramR commented 10 months ago

merged to develop

lindaxiang commented 10 months ago

@UmmulkiramR I tested both data submission and download in cumulus rdpc-qa for small datasets using score version 5.10.0 without providing profile, and both succeeded. I used subworkflow in argo-modules to test both:

UmmulkiramR commented 10 months ago

Deployed on prod