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 ui_metadata versioning; other small fixes #512

Merged
merged 4 commits into from
Dec 6, 2024

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Dec 6, 2024

Description

PR to update variety of things:

  1. Adds a schema_version within the ui_metadata field to track schema changes over time. This follows the pattern used in AD for maintaining schema versions of the detector JSON object mappings within the system indices. Over time, if there are substantial UI changes requiring new logic to parse to/from the ui_metadata schema (e.g., some new UI-only construct/idea), we can add such logic, bump the schema version, and add branching logic to parse the legacy schema to the new schema. Future work can be done to optimize/minimize the amount of data and help de-risk BWC concerns and the chances of requiring schema version bumps. For more details on that, see Minimize what's stored in ui_metadata #511 .
  2. Resets default queries in the Inspector search panel when switching contexts (ingest v. search)
  3. Fixes typo in preset prompt templates
  4. Fixes overflow in Inspector panel
  5. Misc NPE checks

Testing:

  • confirmed the default schema_version: 1 entry is added to the UI metadata when inspecting the template JSON after creating workflows made after this change
  • confirmed default queries are reset when switching between ingest & search

Issues Resolved

Closes #386

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 added bug Something isn't working infra Changes to infrastructure, testing, CI/CD, etc. backport 2.x labels Dec 6, 2024
Copy link
Collaborator

@saimedhi saimedhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@saimedhi
Copy link
Collaborator

saimedhi commented Dec 6, 2024

@ohltyler ohltyler merged commit c56381d into opensearch-project:main Dec 6, 2024
6 of 7 checks passed
@ohltyler ohltyler deleted the nit-fixes branch December 6, 2024 17:40
opensearch-trigger-bot bot pushed a commit that referenced this pull request Dec 6, 2024
Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit c56381d)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ohltyler pushed a commit that referenced this pull request Dec 6, 2024
(cherry picked from commit c56381d)

Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x bug Something isn't working infra Changes to infrastructure, testing, CI/CD, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support versioning in ui_metadata
2 participants