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

Clean up obj serialization; set up save workflow stub fns #51

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Oct 4, 2023

Description

This PR does a few different things:

  1. Cleans up Workflow serialization in a few different ways: 1/ We now store the reactflow state under workspaceFlowState field in a Workflow. We do some post-processing on the nodes so we don't store unnecessary data in the state. 2/ Serialize the workspace components (knn index, text embedding processor, etc.) by converting class -> obj. To do this we add a toObj() fn in a base component class that all of the component classes extend. We may have future utility functions added here so this sets that up.
  2. Sets up stub functions for the save workflow steps, including flow validation & use case template generation.
  3. Remove components field from the workspace reducer, since we simply utilize the ReactFlowInstance for keeping this state.
  4. Utilizing setDirty() / removeDirty redux fns when a node or edge is added (deletions are TBD since there is no UX design on this part yet). See demo video below, where the 'save' button is only clickable when there is a change in the workspace state (adding an edge), and gets disabled after it has been "saved":
screen-capture.13.webm

Issues Resolved

Makes progress on #10, #16, #18

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
Copy link
Member Author

ohltyler commented Oct 5, 2023

Rebased to resolve merge conflicts

@ohltyler ohltyler force-pushed the generate-template-2 branch from 1d8aac3 to a989219 Compare October 5, 2023 23:55
@ohltyler ohltyler merged commit f30ac98 into opensearch-project:main Oct 6, 2023
4 checks passed
@ohltyler ohltyler deleted the generate-template-2 branch October 6, 2023 16:17
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 6, 2023
Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit f30ac98)
ohltyler added a commit that referenced this pull request Oct 6, 2023
Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit f30ac98)

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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants