metno / discovery-metadata-catalog-ingestor

Apache License 2.0
1 stars 1 forks source link

Delete function in file distributor must consider namespace before deleting #229

Open mortenwh opened 2 months ago

mortenwh commented 2 months ago

Currently, the file distributor deletes datasets only based on the uuid. If a dataset from staging, with namespace no.met.staging, has been mistakenly added, the original one (with namespace no.met) will be erroneously deleted when cleaning up. This can happen, since insert will add the dataset to csw and solr, even if the namespace is incorrect (see #228; but it will not be added in the file dist).

charlienegri commented 2 months ago

@Teddy-1000 I think I got it wrong and I addressed this in https://github.com/metno/discovery-metadata-catalog-ingestor/blob/namespace_checks/dmci/api/app.py#L237, I can take both issues if you are ok, or then I also can drop this branch if you already worked on this issue, no stress

Teddy-1000 commented 2 months ago

@Teddy-1000 I think I got it wrong and I addressed this in https://github.com/metno/discovery-metadata-catalog-ingestor/blob/namespace_checks/dmci/api/app.py#L237, I can take both issues if you are ok, or then I also can drop this branch if you already worked on this issue, no stress

I have not started, go ahead with your branch. @charlienegri