NASA-PDS / registry-mgr

Standalone Registry Manager application responsible for managing the PDS Registry (https://github.com/NASA-PDS/registry) schemas and indexes.
https://nasa-pds.github.io/registry
Other
0 stars 2 forks source link

As a user, I want to delete all products in my node registry #80

Open jordanpadams opened 3 months ago

jordanpadams commented 3 months ago

Checked for duplicates

Yes - I've already checked

🧑‍🔬 User Persona(s)

Node Operator

💪 Motivation

...so that I can delete all products in my node registry during testing or when I know I messed something up

📖 Additional Details

No response

Acceptance Criteria

Given a node registry index with >1 products loaded When I perform registry-mgr --delete-all Then I expect all products in my node registry to the be deleted

⚙️ Engineering Details

Follow-on to #78

🎉 I&T

No response

al-niessner commented 3 months ago

What does that mean? Does it mean delete the index and start all over? Delete each item one by one? The first loses the known data names and types (schema) while the latter could take near forever if index is large. If the first, then it should be clean like delete-index rather than delete-all.

jordanpadams commented 3 months ago

@al-niessner

The first loses the known data names and types (schema) while the latter could take near forever if index is large. If the first, then it should be clean like delete-index rather than delete-all

Hmmmm. I am ok with delete-index, but then let's make sure we clearly call out in the description that this deletes all products in the node registry, and creates a new index.

al-niessner commented 3 months ago

@jordanpadams

I think we have this already. We call it delete-registry. This is where I think the concept of delete gets messed up. If I delete an observational product, then we remove it from registry. Done. However if it was part of a collection, that collection still thinks it is pointing at that observational which no longer exists. You can double check with @tloubrieu-jpl and @alexdunnjpl but I think registry-api is going to hate you for this.

Now delete a collection. Do you remove it from registry-refs too? What about updating all of the bundles that may have it?

The general data-delete leaves your database all messed up because it removes just the registry doc. I can go back and double check, but I do not remember any searches complicated enough to find all references to any document.

In fact, go back to that delete an observational. Do you modify the collection or delete collection? Same with bundle since they can also contain the observational.

I think you may want to simply get rid of the data-delete all around.