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.
Change the Publish button on the Model Edit page to use the /action/publish/:modelName endpoint instead of re-using the same endpoint as the Save button but with an extra flag set
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:develop
intomaster
master
Commits
β»οΈ Refactor Individual Model Publishing on Model Edit Page (https://github.com/nci-hcmi-catalog/portal/issues/1000)
Publish
button on the Model Edit page to use the/action/publish/:modelName
endpoint instead of re-using the same endpoint as theSave
button but with an extra flag set⨠Add New Publish Router (https://github.com/nci-hcmi-catalog/portal/issues/1000)
/publish
endpoint and service, mirroring the structure of the GDC Variant Importer, for Asynchronous Publishingπ Fix Bugs in Async Publisher Service (https://github.com/nci-hcmi-catalog/portal/issues/1000)
await
before running validation and creating publish tasks to prevent starting empty publish queue/bulk
before/:name
to prevent overlapπ 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)
PublishNotifications
system to UI, closely following the GDC Variant Import Notifications patternπ‘ Update Comments
β‘οΈ Optimize Async Bulk Publishes (https://github.com/nci-hcmi-catalog/portal/issues/1000)