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 Migration Assistant Type Mapping documentation #9164

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AndreKurait
Copy link
Member

Description

Add Migration Assistant Type Mapping documentation

Issues Resolved

MIGRATIONS-2385

Version

all (Migration Assistant 2.1.5+)

Frontend features

n/a

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

github-actions bot commented Feb 7, 2025

Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged.

Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer.

When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review.

8. When running metadata migration, run with the additional parameter `console metadata migrate --transformer-config-file /shared-logs-output/transformation.json`.[^1]
9. If the transformation configuration is updated, backfill/replayer will need to be stopped and restarted to apply the changes.

[^1]: The `/shared-logs-output` mount will soon be relocated with a new mountpoint on the container for the EFS volume.
Copy link
Member

Choose a reason for hiding this comment

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

Can we remove, what action would a reader of the document take with this note?

Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

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

Thanks for writing this up.

Lets consider reframing this documentation for a user they doesn't know if they use this deprecated feature, this kind of jumps into 'what to do' without enough context for a user to know if they are impacted and why they should make different choices.

### Using the TypeMappingsSanitizationTransformer

1. Navigate to the bootstrap box and open the `cdk.context.json` with vim.
2. Add/Update the key `reindexFromSnapshotExtraArgs` to include `--doc-transformer-config-file /shared-logs-output/transformation.json`. [^1]
Copy link
Member

Choose a reason for hiding this comment

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

Can we supply an empty file at this location and adjust our defaults to pull from this location - that would shorten what a user need to do? We are adding a lot of steps that look very similar and are easy to do incorrectly.

"post": "new_posts"
}
},
"sourceProperties": {
Copy link
Member

Choose a reason for hiding this comment

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

Can we remove the version here? Maybe I am missing how it is valuable for a user to pick a different version

Comment on lines +89 to +90
"user": "combined_activity",
"post": "combined_activity"
Copy link
Member

Choose a reason for hiding this comment

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

Can we simplify this name to activity?

[
{
"TypeMappingsSanitizationTransformerProvider": {
"staticMappings": {
Copy link
Member

Choose a reason for hiding this comment

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

Can we drop this node, so its just a list of indices and the types to be mapped?

"TypeMappingsSanitizationTransformerProvider": {
"staticMappings": {
"activity": {
"user": "users_only",
Copy link
Member

Choose a reason for hiding this comment

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

So any types that are included will be dropped? That seems like an easy thing to get wrong or mistype, do we have a way to preflight this and warn users what they are doing if its by accident or is there a way we can make this more intention?

{
   "{index-name}": {
      "mappedTypes": {
         "users": "users_only"
       },
       "droppedTypes": [
            "post"
       ]
   }
}

Comment on lines +138 to +142
[
"(.*)",
".*",
"$1"
]
Copy link
Member

Choose a reason for hiding this comment

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

Please add names property names to signal what these mean

Comment on lines +181 to +182
- Within the replayer, create index split is not supported.
- Note: This is only impactful on ES 5.x since multi type index creation is not supported on ES 6.x.
Copy link
Member

Choose a reason for hiding this comment

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

Lets frame this like the other operations so its easier to see.

If it is a known gap, we should proactively create a github issue that folks could comment / vote on and we'd leave a link here in the docs.

Comment on lines +176 to +180
- PUT/POST /{index}/{type}/{id}
- PUT/POST /{index}/{type}/
- GET /{index}/{type}/{id}
- PUT/POST /_bulk
- PUT/POST /{index}
Copy link
Member

Choose a reason for hiding this comment

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

Lets turn this into a table with a leading column for the operation name such as Index, etc Bulk Index/Update/Delete.

- Within the replayer, create index split is not supported.
- Note: This is only impactful on ES 5.x since multi type index creation is not supported on ES 6.x.

### Important Notes
Copy link
Member

Choose a reason for hiding this comment

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

these important notes are at the bottom, lets see if we can better integrate them into the workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants