whole-tale / girder_wholetale

Girder plugin providing basic Whole Tale functionality
BSD 3-Clause "New" or "Revised" License
3 stars 5 forks source link

Remove DataONE specific params from generic endpoints/API #279

Open Xarthisius opened 5 years ago

Xarthisius commented 5 years ago

Through out the codebase we often reference (or pass as a parameter) the location of DataONE's CN or MN, e.g. GET /repository/lookup or POST /dataset/register. Those variables are also hardcoded in gwvolman. This approach raises a couple of issues:

  1. Most notably, in order to deploy WT prod that would (someday) point to D1 prod, we would need to commit changes to the code and master and stable would be always in a diverged state. Not to mention, they need to be kept in sync between this plugin and gwvolman.
  2. It's confusing for other providers why exactly they need to pass variables referencing D1 in a generic API.

Proposed solution

Abstract everything that's D1 specific into the settings. Use them where they're needed instead of trickling down base_url all the way from the REST API down to the actual methods doing registration/publication. Proposed settings:

  1. Registration specific CN/MN. IMHO that should always point to prod D1. However, if it's really necessary to register data from dev D1, provider should be able to figure out the location of CN/MN and act accordingly.
  2. Publication specific CN/MN: that will probably point to dev always or at least until further notice...
ThomasThelen commented 5 years ago
  1. I don't think we really have the need to register datasets from DataONE development server anymore. This came about when we had a restriction where we could only publish production data to production DataONE, and development data to development DataONE.

  2. It's a nice feature to allow users to publish to the development server to spot check their package to make sure it's perfect before assigning a DOI to it. This means we need knowledge of two CNs in gwvolman. The production CN and the dev CN, which is determined when the user selects the repository in the publish modal dropdown.

Xarthisius commented 4 years ago

Publishing part is addressed in https://github.com/whole-tale/girder_wholetale/pull/367