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

Add error field to workflow; propagate all runtime errors in tools tab #210

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Jul 10, 2024

Description

This PR consolidates some of the error handling and finishes the Errors tab in the Tools component. Tools will automatically switch to the Errors tab if any of the following occur:

  • error while performing the ingest/query OpenSearch APIs executing when testing ingest/search
  • error while performing CRUD APIs on a workflow (create/update/provision/deprovision)
  • underlying API error when performing provision/deprovision <-- these are special cases where the REST call returns success, but the error field within the workflow state will be populated if some intermediate step may have failed (e.g., index already exists when provisioning, error creating ingest pipeline, etc.)

To handle the last case, we need to persist the error found in redux store, similar to the workflow state. This PR adds the optional error to the Workflow interface and persists it when it is found in API responses on server-side (both the get workflow path, and the search workflow path that could be multiple workflows)

Other minor changes:

  • cleans up some unnecessary toasts on the base Workflows and Workflow Editor pages, as well as in the helper fns when performing the different API dispatch calls.
  • integrates ingest API into redux which was originally missed

Demo video shows an example of 2 different types of failures:
1/ error when running ingest due to the document being in an invalid format when passed to the LLM via the ML inference processor
2/ error when provisioning a workflow since the index name is already created

In both cases, the Tools tab automatically redirects to the Errors tab and displays the relevant message. Final formatting of the error message is TBD as there is no UX for that.

screen-capture.2.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 9f7e6eb into opensearch-project:main Jul 11, 2024
10 checks passed
@ohltyler ohltyler deleted the error-tab branch July 11, 2024 16:06
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 11, 2024
ohltyler added a commit that referenced this pull request Jul 11, 2024
#210) (#211)

Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit 9f7e6eb)

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