opensearch-project / dashboards-flow-framework

A UI designer for constructing AI applications with OpenSearch
Apache License 2.0
9 stars 6 forks source link

Integrate with updated Flow Framework APIs #222

Closed ohltyler closed 1 month ago

ohltyler commented 1 month ago

Description

This PR integrates with 2 new enhancements to Flow Framework APIs:

  1. Ability to force delete indices when deprovisioning https://github.com/opensearch-project/flow-framework/pull/763
  2. Ability to update certain fields (e.g., ui_metadata, name) on a provisioned workflow https://github.com/opensearch-project/flow-framework/pull/757

With enhancement 1, we no longer have errors when deprovisioning / reprovisioning a workflow when the index config does not change. Before, this would produce exceptions on provision, due to the fact the index still exists, due to the fact we couldn't delete the index.

With enhancement 2, we can easily update and persist the UI form configuration (stored via ui_metadata field) without users explicitly clicking on an Ingest/Search button, which was doing the deep & full deprovision / provision actions - essentially giving us a "lightweight" save. Because of this, we can have some autosave functionality as users fill out their form. Current implementation is to perform a save behind-the-scenes when users touch any form field that is persisted. It is debounced (rate-limited) to save at a maximum of every 10s. We can tune this or change the scope of how/when we save later on as well.

Implementation details:

Demo video, showing 1/ multiple creations of the same index after adding an ingest pipeline with no errors, and 2/ autosaving. Input is entered in the form, and after refreshing the page, it is still visible and populated where the user last left off.

screen-capture (5).webm

Issues Resolved

Makes progress on #23

Check List

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.