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

[Case] Markdown table is not correctly migrated to newer version of Kibana after 7.14 #119509

Closed
dej611 opened this issue Nov 23, 2021 · 4 comments · Fixed by #119995
Closed

[Case] Markdown table is not correctly migrated to newer version of Kibana after 7.14 #119509

dej611 opened this issue Nov 23, 2021 · 4 comments · Fixed by #119995
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Cases Cases feature Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@dej611
Copy link
Contributor

dej611 commented Nov 23, 2021

Kibana version: 7.15 onwards

Describe the bug:

When a case markdown comment contains a table the migration process halts with the following error:

kibana_7_15_0    | {"type":"log","@timestamp":"2021-11-23T15:58:43+00:00","tags":["error","savedobjects-service"],"pid":1220,"message":"Error: Cannot handle unknown node `table`\n    at Object.unknown (/usr/share/kibana/node_modules/mdast-util-to-markdown/lib/index.js:65:9)\n    at Object.one [as handle] (/usr/share/kibana/node_modules/zwitch/index.js:20:25)\n    at flow (/usr/share/kibana/node_modules/mdast-util-to-markdown/lib/util/container-flow.js:15:15)\n    at Object.root (/usr/share/kibana/node_modules/mdast-util-to-markdown/lib/handle/root.js:6:10)\n    at Object.one [as handle] (/usr/share/kibana/node_modules/zwitch/index.js:20:25)\n    at toMarkdown (/usr/share/kibana/node_modules/mdast-util-to-markdown/lib/index.js:38:20)\n    at compile (/usr/share/kibana/node_modules/remark-stringify/index.js:13:12)\n    at Function.stringify (/usr/share/kibana/node_modules/unified/index.js:337:12)\n    at stringifyComment (/usr/share/kibana/x-pack/plugins/cases/common/utils/markdown_plugins/utils.js:56:6)\n    at /usr/share/kibana/x-pack/plugins/cases/server/saved_object_types/migrations/index.js:101:56\n    at tryTransformDoc (/usr/share/kibana/src/core/server/saved_objects/migrations/core/document_migrator.js:553:22)\n    at migrateProp (/usr/share/kibana/src/core/server/saved_objects/migrations/core/document_migrator.js:635:22)\n    at applyMigrations (/usr/share/kibana/src/core/server/saved_objects/migrations/core/document_migrator.js:353:20)\n    at DocumentMigrator.transformAndValidate [as transformDoc] (/usr/share/kibana/src/core/server/saved_objects/migrations/core/document_migrator.js:293:22)\n    at /usr/share/kibana/src/core/server/saved_objects/migrations/core/document_migrator.js:101:16\n    at Immediate._onImmediate (/usr/share/kibana/src/core/server/saved_objects/migrations/core/migrate_raw_docs.js:158:17)"}

That is due to a change to the new remarkStringify plugin introduced in #96703 which since version 9 drop the support for markdown table ( release 9.0.0 connected with remark 13.0.0 which dropped table support in favour of a module split )

The migration problem does not happen up to 7.14.0 .

Steps to reproduce:

  1. Create a 7.13 instance and add a table comment to a case
  2. Upgrade the instance to 7.15
  3. The migration process halts.

Expected behavior:

The migration process should successfully complete.

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:

@dej611 dej611 added bug Fixes for quality problems that affect the customer experience Feature:Cases Cases feature labels Nov 23, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Nov 23, 2021
@dej611 dej611 added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Nov 23, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Nov 23, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-cases (Team:Threat Hunting:Cases)

@cnasikas
Copy link
Member

cc @patrykkopycinski

@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@kobelb kobelb added the needs-team Issues missing a team label label Jan 31, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Cases Cases feature Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants