linz / geostore

Central storage, management and access for important geospatial datasets
MIT License
33 stars 2 forks source link

Bug: collection.json with identical STAC id doesn't update root catalog. #2018

Open billgeo opened 2 years ago

billgeo commented 2 years ago

Bug Description

When submitting some data to a dataset that has the same STAC ID in teh collection/catalog.json as another dataset results in the dataset being imported to S3 but then the 'update root catalog' function fails because you can't have two catalog children with the same id.

Need to check what happens when submitting a partial dataset version update, like adding one item.json to a dataset.

Tasks

How to Reproduce

  1. Create a dataset and import a dataset version
  2. Create a 2nd dataset and import a dataset version with the same staging data as the 1st version

What did you expect to happen?

What actually happened?

Software Context

Operating system: AWS Console Lambda 'test' tool

Environment: Nonprod

Relevant software versions:

Additional context

Definition of Done

billgeo commented 2 years ago

Two options:

  1. write the id in the geostore to match the random id string created by the geostore dataset function, so it is always unique
  2. check the IDs are unique across datasets and exit the step fucntion if they are not, and return message to the user (could use pystac or put all the STAC IDs in dynamodb)