nci-hcmi-catalog / portal

HCMI Searchable Catalog Portal
https://hcmi-searchable-catalog.nci.nih.gov/
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

✨ Async Publishing (#1000) #1011

Closed mistryrn closed 2 years ago

mistryrn commented 2 years ago

In lieu of a detailed PR description, I've added PR comments on each file (where necessary).

The TL;DR is we've essentially duplicated the async "GDC Variants Importer" and repurposed it as a new async "Publisher" service. This new "Publisher" uses the same queue system, has its own /publish router with similar endpoints to the importer, but publishes models to ES instead of importing variants for them.

On the UI we've replaced all calls to the old publish endpoints with calls to the new async endpoints, removed any locking/freezing of the UI when publishing, added a "Publish Progress" banner similar to the one used for GDC import progress, and updated the ModelStatusPill component to display "Publish in Progress" for models that are currently being published.

Due to time constraints, there is quite a bit of code duplication unfortunately. A few import-specific functions/components have been duplicated and had some parts removed and the rest renamed from "import" to "publish". A nice refactor/cleanup ticket can be made in the future, but this works for now.

🚨 RELEASE INSTRUCTIONS 🚨

Once this PR and the HHS Vulnerability Disclosure PR (https://github.com/nci-hcmi-catalog/portal/pull/1010) are merged to develop, please do the following:

  1. Make and merge a "πŸ”– Release 1.17.0" PR from develop into master
  2. Make a new Release, tag "1.17.0" off of master
  3. Provide the following instructions to Cuong for deployment: https://docs.google.com/document/d/1kTUCJmAX5HUygZ4oGdAN3-sZDIV1YrgbD4KxEfPtwp0/edit#

Commits

♻️ Refactor Individual Model Publishing on Model Edit Page (https://github.com/nci-hcmi-catalog/portal/issues/1000)

✨ Add New Publish Router (https://github.com/nci-hcmi-catalog/portal/issues/1000)

πŸ› Fix Bugs in Async Publisher Service (https://github.com/nci-hcmi-catalog/portal/issues/1000)

πŸ“ Update Documentation for Publish Router (https://github.com/nci-hcmi-catalog/portal/issues/1000)

✨ Async Publishing (https://github.com/nci-hcmi-catalog/portal/issues/1000)

πŸ’‘ Update Comments

⚑️ Optimize Async Bulk Publishes (https://github.com/nci-hcmi-catalog/portal/issues/1000)