Closed jordanpadams closed 1 year ago
We can raise a warning if it is missing
Hi @jordanpadams, @rsjoyner
I am converting the error related to missing doi in the PDS4 label as a warning.
But now I am wondering what should happen when the doi is missing in the label:
I think 2b. would be eventually better since it will give more flexibility to the users but it is a bigger update in the code and I don't want to mess what was already tested/used by @rsjoyner.
My proposal is then to develop 1 and 2a and create a ticket for 2b.
@tloubrieu-jpl agreed on your approach. Most future DOIs will want to reserve than come back and release at a later date
@jordanpadams , @rsjoyner
When I look at the unit tests, there is a case where we update the lidvid (the version actually) associated to a DOI. I believe that is something the @rsjoyner had to do. If we need that, we should rethink the way we do it without having the DOI in the PDS4 label.
Or one option would be to, in case we have both PDS identifier and DOI in the label, to prioritize the DOI (so that we can update the lidvid). If DOI is missing, obviously we use the PDS identifier to match with the preexisting DOI (e.g. reserved).
That will make the code and the readability of the software behavior more complex though.
This requirement was not validated by B13.0 I&T
@gxtchen @viviant100 I was able to validate this ticket with the latest version of the doi-service.
I added the acceptance criteria since the reason for the failure of this test in I&T is most likely the lack details describing what to expect here.
@tloubrieu-jpl what's the version of doi-service you used to validate?
@gxtchen - @tloubrieu-jpl suggests to use doi-service v2.4.0-dev for testing.
💪 Motivation
...so that I can release a DOI for a product even if it doesn't contain the DOI in the label
📖 Additional Details
Older versions of the PDS4 Information Model do NOT allow DOIs to be included in a label.
⚖️ Acceptance Criteria
Given a product label which lidvid has been previously reserved but without a doi defined in the label When I perform post the label for release Then I expect to get a warning saying the doi is missing in the label
Given a product label which lidvid has not been previously reserved and without a doi defined in the label When I perform post the label for release Then I expect to get a critical error saying the doi is missing in the label, the doi need to be reserved first
⚙️ Engineering Details