NASA-PDS / doi-service

Service and tools for generating DOIs for PDS bundles, collections, and data sets
https://nasa-pds.github.io/doi-service
Other
2 stars 3 forks source link

As a publisher, I want to be notified when a new DOI has been minted or significant update to the metadata #283

Closed jordanpadams closed 1 year ago

jordanpadams commented 2 years ago

💪 Motivation

...so that I can I can re-ingest the metadata from DataCite

📖 Additional Details

⚖️ Acceptance Criteria

Given a DOI service running on pds.nasa.gov When I perform DOI release Then I expect ADS (or TBD other publisher) to receive a TBD notification

Given a DOI service running on pds.nasa.gov When I perform update of TBD fields in DOI metadata for a released DOI Then I expect ADS (or TBD other publisher) to receive a TBD notification

⚙️ Engineering Details

alexdunnjpl commented 1 year ago

@jordanpadams requesting clarification on the following:

jordanpadams commented 1 year ago
  • Who/what is ADS (or more generally, what should determine the recipient(s) of the email notification for a given DOI)?

For now, can we just send this to a configurable email address (e.g. for now use pdsen-doi-prod@jpl.nasa.gov)

  • Is the intent is that only the "release" DOICoreAction action performed on any DOI(s), whether by CLI or API, should trigger email notification, or does this apply to the (local-db-only) update DOICoreAction? Sounds like the latter.
  • Should reserve DOICoreActions also trigger this notification?
  • Do you have a minimal spec for the information to be included in the email notification, or are you happy for me to wing it?

In general, I am just thinking this is a weekly report / breakdown of DOI actions from the past week.

For each DOI record, I am thinking we include:

Any other ideas welcome!

alexdunnjpl commented 1 year ago

@jordanpadams what does a typical response workflow look like?

If users are likely to do anything iterative to the returned records, I think it would be smart to (in addition to those details) include either a newline-separated set of DOI ids (or whichever id will most-likely be used as an input for a response script) in the body of the email, or attach a json of the corresponding DoiRecords.

If the response will invariably be manual, then I guess it's not so important, but I wonder if someone's likely to want to feed the output into a bash/python script?

We don't track whether a transaction for a findable DOI is the first findable transaction, so if it's not important I'll just distinguish "added last week" and "modified last week (without filtering out new additions, unless it's important that they not appear here, which isn't hard to track but is a minor annoyance to account for the possibility that a DOI might be added on Monday and updated on Wednesday, say, and must appear in both lists)"

jordanpadams commented 1 year ago

@alexdunnjpl Attaching a JSON sounds great. This should be a quick adaptation down the road if this were, for instance, pushing to an API.

We don't track whether a transaction for a findable DOI is the first findable transaction, so if it's not important I'll just distinguish "added last week" and "modified last week (without filtering out new additions, unless it's important that they not appear here, which isn't hard to track but is a minor annoyance to account for the possibility that a DOI might be added on Monday and updated on Wednesday, say, and must appear in both lists)"

This is fine. We basically just want to notify them that they should ping the DataCite API for the latest metadata for DOIs x,y,z. In reality, we don't need all that other information either, but I am thinking this report could potentially be useful outside of this particular use case, so adding some additional metadata, like title, to make the output a little more readable could be beneficial down the road.

alexdunnjpl commented 1 year ago

@jordanpadams in addition to the PR merge, I'll need to set up the crontab on the live system once the new code is deployed. Where/how is doi-service running? I couldn't run docker ps as the group user on the gamma system so I think I'm missing a piece of the puzzle.

jordanpadams commented 1 year ago

@alexdunnjpl I do not believe it is running in docker on the ops machines.

@c-suh @viviant100 can you point Alex to the deployment on pds-gamma as well as the wiki documentation so had can add instructions for starting this new cron job?