Skip to content

[DOC] [RFC] Add Schema Documentation for Migration Assistant for OpenSearch #12485

@gregschohn

Description

@gregschohn

What do you want to do?

  • Request a change to existing documentation
  • Add new documentation
  • Report a technical problem with the documentation
  • Other

Tell us about your request. Provide a summary of the request.

Background

Users configure the Migration Assistant for OpenSearch with json/yaml files that need to match a specific schema. If the documents are not well-formed to the schema, the workflow won't run and the user cannot proceed.

The Migration Assistant applications use schema verification and the project release artifacts include a schema. Each of these schema files also includes in-depth documentation for each field, making it an invaluable reference. However, schemas aren't easy for humans to digest and the schema is too big (~500KB) for humans to read without tools since it includes complete definitions from dependencies that some users may need to be aware of. Users need a reference to go to figure out how to specify their migration. Having deep links to specific fields provides a great way to help others. Since the Migration Assistant doesn't maintain an HTTP service to provide web-content, it doesn't have a natural way to vend rich content to its users.

As the Migration Assistant evolves, its schema changes too. Users will be distributed across a variety of users. The Migration Assistant maintainers want to make sure that each user can see exactly how the schema is defined for the version that they're using. It would also be helpful to know what's changed between versions of the Migration Assistant.

The Migration Assistant's release cadence is not tied to the OpenSearch project's. As such, the projects have different version numbers and release at different times and frequencies.

Proposal

This proposal is to add a new page under https://docs.opensearch.org/latest/migration-assistant/ to show the schema. Users should see the latest version by default and should have the choice to see older versions. It would be nice to also have the ability to see differences between the schemas.

We propose to implement the schema view page by dynamically loading the schema in the browser and using javascript to render it. Javascript allows the user to collapse and expand specific sections, easily inline $refs, and search through an otherwise formidable tree.

We're open to how this is integrated into the page and want to maintain the same look and feel. We'd like to see some new patterns though, which can be summarized in this sample frame, which we're hoping to embed some form of into the documentation website.

Image
Implementation

There are a variety of ways we can deliver the schema content from the opensearch-migrations GitHub artifacts through the documentation website. We can open a PR with the new schema for every Migration-Assistant release, though we'd like to see that eventually improve. Our release cadence has been up to weekly.

Version: List the OpenSearch version to which this issue applies, e.g. 2.14, 2.12--2.14, or all.
Migration Assistant v3.0+

What other resources are available? Provide links to related issues, POCs, steps for testing, etc.
The raw schema can be found here

Metadata

Metadata

Assignees

No one assigned

    Labels

    Backlog - DEVDeveloper assigned to issue is responsible for creating PR.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions