psu-libraries / scholarsphere-3

A web application for ingest, curation, search, and display of digital assets. Powered by Hydra technologies (Rails, Hydra-head, Blacklight, Solr, Fedora Commons, etc.)
Apache License 2.0
78 stars 24 forks source link

Sufia 7 Share Notify Delete #277

Closed awead closed 7 years ago

awead commented 8 years ago

Urls to generic works will look like: /concern/generic_works/0z708w66h Whereas the equivalent for a generic file currently is: /files/0z708w66h

Should use rewrites? Redirects? This also impacts urls stored in SHARE because the unique identifier for the SHARE document is the url... so in order to delete it, check if it exists, we'd have to query it using the old url format.

carolyncole commented 8 years ago

@awead I believe we will have to rewrite the urls to support both the old and the new. I think the rails routes have an alias concept we may want to use.

What we need to do for Share is another question. Should we update the URLs to point to our new schema, or delete them and create new ones...

awead commented 8 years ago

@cam156 I see two options:

1) Make the changes and just start writing new urls. We'll have redirects in place to handle any old url versions. What would happen in Share, is that basically everything would get shared out again with the new urls. We could later go back and delete the old ones with a one-off script.

2) Keep Share writing the old urls. We'll have the redirects to ensure they keep working. At some point in the future we can redo them, either into the new format, or using a handle-based system if we decide to go that route.

carolyncole commented 8 years ago

@awead I think number 1 makes the most sense. Create a script to remove old urls and share with the new ones. @olendorf Do you have a preference?

carolyncole commented 8 years ago

We have 771 items currently in share. https://osf.io/share/?q=*&optional=match%3AshareProperties.source%3Ascholarsphere&sort=Relevance#

Since the integration went live earlier in the year I am thinking that our original leaning towards deleting the items and re adding them may make the most sense. We could add it as a step in our migration process, so the items would not be missing from share for long.

carolyncole commented 8 years ago

Rake task to delete the items from share. Add to migration documents to run this prior to migrating. Log every file that was deleted so we can verify those files actually get removed.

awead commented 7 years ago

@cam156 the above link with the query for items in Share that are from scholarsphere doesn't work. As far as I've been able to tell, I can't find anything in Share from Scholarsphere. Taking a cursory look at datasets, it doesn't look like anything has been added for 2 months:

https://scholarsphere.psu.edu/files/t148fh339

And other items that once were added are no longer:

https://scholarsphere.psu.edu/files/2801pg34x

I wonder if something changed a few months back.

carolyncole commented 7 years ago

@awead did you try to send a file to share and see what the error is? Did you want to write another ticket once you try that for fixing our share integration? It looks like there is a new version of the API: https://share-research.readthedocs.io/en/latest/share_api.html#push-data-directly-into-the-share-database

awead commented 7 years ago

Share isn't accepting any requests in the old format. We'll need to update to the v2 API. See #622