uoregon-libraries / newspaper-curation-app

Suite of front- and back-end tools for the curation of digitized newspaper materials
Apache License 2.0
8 stars 1 forks source link

Create simple "issue removal" workflow #336

Open jechols opened 1 week ago

jechols commented 1 week ago

This addresses the first piece of #330, and only for issues that are live but not archived. Even so this might prove to need even more splitting up into smaller issues and/or multiple PRs, but we'll see.

We want to add a function for flagging a live issue as "bad". For now that only means we want to remove issues and build a new version of the same batch, with the removed issues pulled back into NCA.

I believe this will start with a new table to manage batches that are in the process of being rebuilt. Initially we want to get the live issue flagged in some way in NCA that prevents it from being archived, but we don't want to actually pull it off staging or production immediately.

We might need to reconsider how the "needs staging purge" flag works. We'll need either a separate flag to state that we need to purge from production, or maybe that flag just means "purge from anywhere it's loaded".

We might also need to start thinking about what automated sshing might look like. If we automate the loading and purging, flags like the above can go away and be replaced by a job instead.

We might also need to start checking for batch existence via an API. Having people say they loaded something or purged something is not ideal when NCA could instead perform a periodic check of any batches in need of loading/purging. This could in fact be a job that just never fails in a fatal way: is batch on environment X? If so, mark it live and move on with the pipeline. (Or invert that for purges)

Yeah, this is probably going to need to be broken down further.