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

Obsoleted resource maps are shown in the download dropdown menu #537

Closed
vchendrix opened this issue Mar 28, 2018 · 16 comments
Closed

Obsoleted resource maps are shown in the download dropdown menu #537

vchendrix opened this issue Mar 28, 2018 · 16 comments
Assignees
Labels
bug ESS-DIVE Issues associated with the ESS-DIVE project
Milestone

Comments

@vchendrix
Copy link
Collaborator

If a user creates data derivations, thus resulting in multple resource maps for a data package why would the user be allowed to download all the different resulting data packages and not the most current one?

Multiple data package downloads

This is confusing. It seems to me that the user should only be able to download the current data package.
screen shot 2018-03-28 at 7 59 26 am

@laurenwalker
Copy link
Member

If a metadata document is in multiple resource maps that are not in the same obsolescence chain, that dropdown menu will appear so they can choose which package to download.

@vchendrix
Copy link
Collaborator Author

@laurenwalker What I am confused by is how does the user know which package they want? It just numbers them 1-3.

@laurenwalker
Copy link
Member

Yeah, it's not a very informative interface. It has been a rare case in our repositories so we haven't dedicated the time to improving it.

@vchendrix
Copy link
Collaborator Author

vchendrix commented Mar 30, 2018 via email

@vchendrix
Copy link
Collaborator Author

vchendrix commented Mar 30, 2018 via email

@laurenwalker
Copy link
Member

I believe they are ordered semi-arbitrarily based on the ordering received from the Solr index resourceMap field. They are all "current versions" in that none of the resource maps listed in that dropdown are obsoleted. It would make sense to order them by uploadDate and give them a better label than "Dataset 1", "Dataset 2", etc. Maybe we could show the citation for that package with a link to that package's MetadataView (#view).

@laurenwalker
Copy link
Member

This is a symptom of having a metadata-centric system - the search on the DataCatalogView (#data) returns science metadata objects, so when a science metadata object is in more than one package/resource map, we don't really have a way of determining which package is the "current one" that the user is interested in downloading. So ultimately they need to choose which package they want to download.

This has been a rare case in the DataONE world since science metadata documents are usually only in one dataset, so we haven't flushed out that dataset selection UI. Is this is a common occurrence in your repository?

@vchendrix
Copy link
Collaborator Author

vchendrix commented Apr 9, 2018

From my tests using the Metacat UI derivations interface, I have confirmed that if I make an number of new derivations that the obsoleted resource maps show up in the index search results.

Example of multiple derivations

This is an image taken from my localhost
screen shot 2018-04-09 at 9 36 22 am

Three obsoleted resourceMaps

This document returns four resource maps. The first three in the list are obsoleted. The last one is the current one. Is this an issue with metacat or metacat UI. It seems to me that either Metacat should not return the obsoleted resource maps OR the query in Metacat UI needs to filter out the obsoleted resource maps.

Search by ID: ess-dive-7d51d34fce3ce31-20180330T175118791
id=ess-dive-7d51d34fce3ce31-20180330T175118791 seriesId=
	formatType=METADATA
	title=FOOOOOOO
	obsoletes=
	obsoletedBy=
	resourceMap=['urn:uuid:6d8641e5-1882-4415-b4ee-b3052b8104bb', 
               'ess-dive-6a6fdd22f6b14d6-20180409T163002986', 
               'ess-dive-12f541e7f9f6116-20180409T163011714', 
               'ess-dive-edd489d38bd083b-20180409T163022313']

@laurenwalker
Copy link
Member

@vchendrix - Ok, I see the issue you are talking about now. I'll create a separate ticket for the download dropdown menu UI improvements, since that is a different issue than this bug.

@gothub - It looks like Val found a bug in the prov editor where a new resource map is created and the old resource maps are not obsoleted in the system metadata. Let me know if you have the time to look into this and if not, I can.

@laurenwalker laurenwalker added this to the 2.0.0 RC 6 milestone Apr 17, 2018
@laurenwalker laurenwalker changed the title Why are multiple data packages showing for download? Prov editor does not obsolete the existing resource map Apr 17, 2018
@laurenwalker laurenwalker changed the title Prov editor does not obsolete the existing resource map Obsoleted resource maps are shown in the download dropdown menu Apr 17, 2018
@laurenwalker
Copy link
Member

Ack, sorry it looks like I didn't investigate far enough before I commented on this ticket. The resource maps ARE obsoleted correctly, it's just the dropdown menu that is wrong. I'll slate this into a 2.0.1 release.

@laurenwalker
Copy link
Member

I created the above referenced Metacat issue to solve this bug, which is ultimately caused by a Solr index bug, not a MetacatUI bug. When the Solr index is fixed, the messed-up download buttons will resolve themselves. Will keep track of the progress there.

@laurenwalker
Copy link
Member

After some discussion with the dev team, this may not be a Metacat issue after all. Reopening.

@laurenwalker laurenwalker reopened this Jul 31, 2018
@laurenwalker
Copy link
Member

laurenwalker commented Jul 31, 2018

Download Dropdown Menu Issue

Issue description: When a metadata document is aggregated by more than one resource map in the same obsolence chain, both obsoleted packages and their newer versions are shown in the download dropdown menu.

This issue is primarily caused after a package is updated with the provenance editor.

Original github issue: #537

Expected behavior: The search result row should show a dropdown menu so the user can select which package s/he wants to download. Only the most recent version of the packages that contains this metadata document should be shown in the menu.

Example:

Metadata document M is aggregated by resource map A. The Solr document for metadata M looks like this:

id: M
resourceMap: A

Provenance relationships are added to the resource map and this new version is given id B. M is now also aggregated by resource map B. The Solr document for metadata M looks like this:

id: M
resourceMap: A, B

In this example, the search result row in MetacatUI would have a download dropdown menu with two choices: A or B.

A and B are technically unique packages available for download, but in this scenario, there doesn't seem to be a good reason to ever download package A. It would make most sense to have the download button only download package B.

Now, let's say the data owner creates a new resource map, Z, which aggregates M, but it contains different data files and is a totally separate package. Z does not obsolete B. Now the Solr document for metadata M looks like this:

id: M
resourceMap: A, B, Z

Ideally, the download menu would have the choice to download either B or Z, so those are the most recent resource maps that aggregate M.

Solutions

There are a few different options to solve this issue:

A. MetacatUI sends another (sigh) Solr query to determine if any of the resource maps listed in the Solr resourceMap field are obsoleted by another id in that list. This would be one more query per search results page. It would not hold up the rendering of the search result row in the UI, but the download button will have a slight delay rendering if there are multiple resource maps.

B. We add a new Solr field that contains only the newest resource map identifiers. In the example above, the Solr document for M could look like:

id: M
resourceMap: A, B, Z
newestResourceMap: B, Z

C. When there are multiple packages, we disable the download button, and add a tooltip that instructs users to click to go to the dataset landing page and see the list of packages to choose from. The MetadataView renders a table for each unobsoleted resource map.


Anyone feel free to share input if interested. I am leaning towards solution C

@vchendrix
Copy link
Collaborator Author

vchendrix commented Aug 6, 2018 via email

@laurenwalker
Copy link
Member

I am going to move forward with Option C.

@laurenwalker laurenwalker self-assigned this Aug 9, 2018
@laurenwalker laurenwalker modified the milestones: 2.3.0, 2.2.0 Aug 9, 2018
@laurenwalker laurenwalker modified the milestones: 2.2.0, 2.3.0 Sep 6, 2018
@laurenwalker laurenwalker modified the milestones: 2.3.0, 2.4.0 Oct 11, 2018
@laurenwalker laurenwalker modified the milestones: 2.4.0, 2.5.0 Nov 19, 2018
@laurenwalker laurenwalker modified the milestones: 2.5.0, 2.6.0 Dec 6, 2018
@laurenwalker laurenwalker modified the milestones: 2.6.0, 2.7.0 Mar 4, 2019
@vchendrix vchendrix added the ESS-DIVE Issues associated with the ESS-DIVE project label Jun 3, 2019
laurenwalker added a commit that referenced this issue Sep 2, 2019
…he download button and display a tooltip instead of showing a dropdown menu of the datasets.

Closes #537
@laurenwalker
Copy link
Member

This has been fixed by changing the resultsItem template. @vchendrix, just make sure that the ESS-DIVE theme resultsItem.html template merges these changes in. If you'd like me to do that, let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ESS-DIVE Issues associated with the ESS-DIVE project
Projects
None yet
Development

No branches or pull requests

2 participants