Integrate with updated Flow Framework APIs #222
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR integrates with 2 new enhancements to Flow Framework APIs:
ui_metadata
,name
) on a provisioned workflow Support editing of certain workflow fields on a provisioned workflow flow-framework#757With 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:
touched
is updated on every type of input (model dropdown, map, JSON)WorkflowInputs
component to listen on & execute autosave in a debounced fashion when conditions are metWorkflowInputs
- in these cases, we want to force delete and re-create any created index as users test. On the search side, we will not want this. TODO comment has been added, and will be dealt with once fine-grained provisioning is supportedupdate_fields
parameter, specifying to only update metadata fields likeui_metadata
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
--signoff
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.