Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-processor support & associated CRUD operations #168

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

ohltyler
Copy link
Member

Description

This PR updates the 'Enrich data' section on ingest-related workflow inputs to support multiple processors, including the ability to add and delete them. Specifically:

  • persists a standalone UiConfig prop to pass to all of the downstream form inputs, instead of the workflow. This way, we can decouple the form from being tied to the backend-persisted workflow config. Now, we can have a flexible, updatable UiConfig that we can add/remove fields (including adding/removing processors) without saving/updating in the backend. We add callbacks to the base fn to re-generate the form values & form schema when changes are made. When the users finally save, we will take this dynamic UiConfig field and update the underlying backend workflow with it
  • adds addProcessor() and deleteProcessor() fns to the ProcessorsList, and using that functionality in the existing 'Add processor' button, and the new delete button. Both of these fns will take the existing config (getting any updated/interim values along the way), update the config, and letting the base ResizableWorkspace component re-generate the form values / form schema
  • general component updates to the processors list (nesting within a panel, adding buttons, formatting updates)
  • minor improvements to formik propagation - using useFormikContext() instead of passing formik props explicitly into WorkflowInputs and ProcessorsList

Note: the ability to choose some preset processors and/or provide a more useful generated ingest processor will be in subsequent PRs. This is just focusing on allowing the ability to update the list and persist it correctly.

Demo video, showing add/delete of processors, and when saving, showing the changes persisted on refresh:

screen-capture.37.webm

Issues Resolved

Makes progress on #23

Check List

  • Commits are signed per the DCO using --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.

@ohltyler ohltyler merged commit 976cab2 into opensearch-project:main Jun 10, 2024
10 checks passed
@ohltyler ohltyler deleted the processor-refactor branch June 10, 2024 18:18
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 10, 2024
Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit 976cab2)
ohltyler added a commit that referenced this pull request Jun 10, 2024
Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit 976cab2)

Co-authored-by: Tyler Ohlsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants