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

Upgraded lens visualization has bad request in dashboard panels & error loading saved documents in visualize app #162069

Closed
bhavyarm opened this issue Jul 17, 2023 · 5 comments · Fixed by #162106
Labels
blocker bug Fixes for quality problems that affect the customer experience Feature:Lens regression Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@bhavyarm
Copy link
Contributor

Kibana version: 8.9.0 BC4

Elasticsearch version: 8.9.0 BC4

Server OS version: darwin_arch

Browser version: chrome latest

Browser OS version: OS X

Original install method (e.g. download page, yum, from source, etc.): from staging

Describe the bug: Upgraded lens visualizations from 7.17.4 to 8.9.0 display bad request on dashboard panels and error loading saved documents in visualize app

Dashboard app:
Screen Shot 2023-07-17 at 11 20 24 AM

Visualize app:

Screen Shot 2023-07-17 at 11 33 07 AM

Browser console error:

kbn-ui-shared-deps-npm.dll.js:356 Uncaught Error: Bad Request
    at fetch_Fetch.fetchResponse (core.entry.js:1:274385)
    at async core.entry.js:1:272360
    at async core.entry.js:1:272317
fetchResponse @ core.entry.js:1
setTimeout (async)
setTimeout @ kbn-ui-shared-deps-npm.dll.js:356
i @ kbn-ui-shared-deps-npm.dll.js:356
g @ kbn-ui-shared-deps-npm.dll.js:356
e.error @ kbn-ui-shared-deps-npm.dll.js:356
t._error @ kbn-ui-shared-deps-npm.dll.js:356
t.error @ kbn-ui-shared-deps-npm.dll.js:356
t._error @ kbn-ui-shared-deps-npm.dll.js:356
t.error @ kbn-ui-shared-deps-npm.dll.js:356
t._error @ kbn-ui-shared-deps-npm.dll.js:356
t.error @ kbn-ui-shared-deps-npm.dll.js:356
t._error @ kbn-ui-shared-deps-npm.dll.js:356
t.error @ kbn-ui-shared-deps-npm.dll.js:356
t._checkFinalizedStatuses @ kbn-ui-shared-deps-npm.dll.js:351
t._subscribe @ kbn-ui-shared-deps-npm.dll.js:356
e._trySubscribe @ kbn-ui-shared-deps-npm.dll.js:294
t._trySubscribe @ kbn-ui-shared-deps-npm.dll.js:351
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:294
i @ kbn-ui-shared-deps-npm.dll.js:356
e.subscribe @ kbn-ui-shared-deps-npm.dll.js:294
e._subscribe @ kbn-ui-shared-deps-npm.dll.js:294
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:294
i @ kbn-ui-shared-deps-npm.dll.js:356
e.subscribe @ kbn-ui-shared-deps-npm.dll.js:294
g @ kbn-ui-shared-deps-npm.dll.js:356
m @ kbn-ui-shared-deps-npm.dll.js:356
s._next @ kbn-ui-shared-deps-npm.dll.js:6
t.next @ kbn-ui-shared-deps-npm.dll.js:356
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:294
e._trySubscribe @ kbn-ui-shared-deps-npm.dll.js:294
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:294
i @ kbn-ui-shared-deps-npm.dll.js:356
e.subscribe @ kbn-ui-shared-deps-npm.dll.js:294
a @ kbn-ui-shared-deps-npm.dll.js:356
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:351
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:6
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:294
i @ kbn-ui-shared-deps-npm.dll.js:356
e.subscribe @ kbn-ui-shared-deps-npm.dll.js:294
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:356
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:6
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:294
i @ kbn-ui-shared-deps-npm.dll.js:356
e.subscribe @ kbn-ui-shared-deps-npm.dll.js:294
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:356
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:6
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:294
i @ kbn-ui-shared-deps-npm.dll.js:356
e.subscribe @ kbn-ui-shared-deps-npm.dll.js:294
(anonymous) @ embeddable.plugin.js:1
Xc @ kbn-ui-shared-deps-npm.dll.js:420
t.unstable_runWithPriority @ kbn-ui-shared-deps-npm.dll.js:428
Vo @ kbn-ui-shared-deps-npm.dll.js:420
Uc @ kbn-ui-shared-deps-npm.dll.js:420
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:420
N @ kbn-ui-shared-deps-npm.dll.js:428
y.port1.onmessage @ kbn-ui-shared-deps-npm.dll.js:428
contentManagement.plugin.js:1 Content management client error: Invalid response. [item.attributes.description]: expected value of type [string] but got [null]
core.entry.js:1     POST http://localhost:5601/api/content_management/rpc/get 404 (Not Found)
fetchResponse @ core.entry.js:1
(anonymous) @ core.entry.js:1
await in (anonymous) (async)
(anonymous) @ core.entry.js:1
(anonymous) @ core.entry.js:1
(anonymous) @ contentManagement.plugin.js:1
get @ contentManagement.plugin.js:1
queryFn @ contentManagement.plugin.js:1
fetchFn @ kbn-ui-shared-deps-npm.dll.js:379
O @ kbn-ui-shared-deps-npm.dll.js:356
l @ kbn-ui-shared-deps-npm.dll.js:356
fetch @ kbn-ui-shared-deps-npm.dll.js:379
fetchQuery @ kbn-ui-shared-deps-npm.dll.js:372
get @ contentManagement.plugin.js:1
get @ dataViews.plugin.js:1
(anonymous) @ dataViews.plugin.js:1
(anonymous) @ dataViews.plugin.js:1
(anonymous) @ lens.chunk.0.js:3
p @ lens.chunk.0.js:3
f @ lens.chunk.0.js:3
await in f (async)
h @ lens.chunk.0.js:3
await in h (async)
(anonymous) @ lens.chunk.2.js:3
await in (anonymous) (async)
documentToExpression @ lens.plugin.js:2
sg @ lens.chunk.2.js:3
initializeSavedVis @ lens.chunk.2.js:3
await in initializeSavedVis (async)
embeddable_Embeddable @ lens.chunk.2.js:3
create @ lens.plugin.js:2
await in create (async)
(anonymous) @ lens.plugin.js:2
createFromSavedObject @ embeddableEnhanced.plugin.js:2
onPanelAdded @ embeddable.plugin.js:1
initializeChildEmbeddables @ embeddable.plugin.js:1
(anonymous) @ embeddable.plugin.js:1
g @ kbn-ui-shared-deps-npm.dll.js:356
m @ kbn-ui-shared-deps-npm.dll.js:356
s._next @ kbn-ui-shared-deps-npm.dll.js:6
t.next @ kbn-ui-shared-deps-npm.dll.js:356
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:356
s._next @ kbn-ui-shared-deps-npm.dll.js:6
t.next @ kbn-ui-shared-deps-npm.dll.js:356
t._subscribe @ kbn-ui-shared-deps-npm.dll.js:356
e._trySubscribe @ kbn-ui-shared-deps-npm.dll.js:294
t._trySubscribe @ kbn-ui-shared-deps-npm.dll.js:351
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:294
i @ kbn-ui-shared-deps-npm.dll.js:356
e.subscribe @ kbn-ui-shared-deps-npm.dll.js:294
e._subscribe @ kbn-ui-shared-deps-npm.dll.js:294
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:294
i @ kbn-ui-shared-deps-npm.dll.js:356
e.subscribe @ kbn-ui-shared-deps-npm.dll.js:294
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:356
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:6
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:294
i @ kbn-ui-shared-deps-npm.dll.js:356
e.subscribe @ kbn-ui-shared-deps-npm.dll.js:294
a @ kbn-ui-shared-deps-npm.dll.js:356
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:351
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:6
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:294
i @ kbn-ui-shared-deps-npm.dll.js:356
e.subscribe @ kbn-ui-shared-deps-npm.dll.js:294
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:356
b @ kbn-ui-shared-deps-npm.dll.js:356
u @ kbn-ui-shared-deps-npm.dll.js:356
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:356
b @ kbn-ui-shared-deps-npm.dll.js:356
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:356
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:356
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:6
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:294
i @ kbn-ui-shared-deps-npm.dll.js:356
e.subscribe @ kbn-ui-shared-deps-npm.dll.js:294
container_Container @ embeddable.plugin.js:1
dashboard_container_DashboardContainer @ dashboard.chunk.4.js:1
qe @ dashboard.chunk.4.js:1
await in qe (async)
(anonymous) @ dashboard.plugin.js:1
await in (anonymous) (async)
create @ embeddableEnhanced.plugin.js:2
(anonymous) @ dashboard.plugin.js:1
await in (anonymous) (async)
(anonymous) @ dashboard.plugin.js:1
Xc @ kbn-ui-shared-deps-npm.dll.js:420
t.unstable_runWithPriority @ kbn-ui-shared-deps-npm.dll.js:428
Vo @ kbn-ui-shared-deps-npm.dll.js:420
Uc @ kbn-ui-shared-deps-npm.dll.js:420
wc @ kbn-ui-shared-deps-npm.dll.js:420
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:420
t.unstable_runWithPriority @ kbn-ui-shared-deps-npm.dll.js:428
Vo @ kbn-ui-shared-deps-npm.dll.js:420
Qo @ kbn-ui-shared-deps-npm.dll.js:420
Zo @ kbn-ui-shared-deps-npm.dll.js:420
Tc @ kbn-ui-shared-deps-npm.dll.js:420
Mu @ kbn-ui-shared-deps-npm.dll.js:420
t.render @ kbn-ui-shared-deps-npm.dll.js:420
St @ dashboard.chunk.5.js:1
mount @ dashboard.plugin.js:1
await in mount (async)
(anonymous) @ core.entry.js:1
(anonymous) @ core.entry.js:1
(anonymous) @ core.entry.js:1
As @ kbn-ui-shared-deps-npm.dll.js:420
Fc @ kbn-ui-shared-deps-npm.dll.js:420
t.unstable_runWithPriority @ kbn-ui-shared-deps-npm.dll.js:428
Vo @ kbn-ui-shared-deps-npm.dll.js:420
Bc @ kbn-ui-shared-deps-npm.dll.js:420
wc @ kbn-ui-shared-deps-npm.dll.js:420
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:420
t.unstable_runWithPriority @ kbn-ui-shared-deps-npm.dll.js:428
Vo @ kbn-ui-shared-deps-npm.dll.js:420
Qo @ kbn-ui-shared-deps-npm.dll.js:420
Zo @ kbn-ui-shared-deps-npm.dll.js:420
zc @ kbn-ui-shared-deps-npm.dll.js:420
enqueueSetState @ kbn-ui-shared-deps-npm.dll.js:420
m.setState @ kbn-ui-shared-deps-npm.dll.js:396
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:351
r @ kbn-ui-shared-deps-npm.dll.js:356
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:356
notifyListeners @ kbn-ui-shared-deps-npm.dll.js:356
T @ kbn-ui-shared-deps-npm.dll.js:356
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:356
confirmTransitionTo @ kbn-ui-shared-deps-npm.dll.js:356
push @ kbn-ui-shared-deps-npm.dll.js:356
navigate @ core.entry.js:1
u @ core.entry.js:1
await in u (async)
navigateToUrl @ core.entry.js:1
onClick @ core.entry.js:1
He @ kbn-ui-shared-deps-npm.dll.js:420
Ve @ kbn-ui-shared-deps-npm.dll.js:420
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:420
Tr @ kbn-ui-shared-deps-npm.dll.js:420
Cr @ kbn-ui-shared-deps-npm.dll.js:420
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:420
De @ kbn-ui-shared-deps-npm.dll.js:420
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:420
Dr @ kbn-ui-shared-deps-npm.dll.js:420
en @ kbn-ui-shared-deps-npm.dll.js:420
Jt @ kbn-ui-shared-deps-npm.dll.js:420
t.unstable_runWithPriority @ kbn-ui-shared-deps-npm.dll.js:428
Vo @ kbn-ui-shared-deps-npm.dll.js:420
ke @ kbn-ui-shared-deps-npm.dll.js:420
Zt @ kbn-ui-shared-deps-npm.dll.js:420
contentManagement.plugin.js:1 Content management client error: Saved object [index-pattern/e6994960-bd9e-11eb-9520-1b4c3ca6a781] not found

Dashboard displaying fine in 7.17.4:
Screen Shot 2023-07-17 at 11 38 33 AM

lens_bar_verticalpercentage in lens app(first panel in 8.9.0 dashboard with bad request):
Screen Shot 2023-07-17 at 11 38 42 AM

7.17.4 dashboard saved object -
7.17.4_dashboard.ndjson.zip

8.9.0 dashboard saved object -
8.9.0_dashboard.ndjson.zip

@bhavyarm bhavyarm added bug Fixes for quality problems that affect the customer experience blocker regression Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Jul 17, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations)

@stratoula
Copy link
Contributor

@elastic/appex-sharedux this migration failed because these SOs have a description null.

This is the error we get from the content management system

image
Content management client error: Invalid response. [item.attributes.description]: expected value of type [string] but got [null]

How can we overpass this?

@stratoula
Copy link
Contributor

stratoula commented Jul 18, 2023

This happens in maps too and possibly other SOs that have null description (not sure if it were ever possible to have null description in maps.) It seems from the SOs that Bhavya sent that it was possible for visualizations. With this schema change the bug if fixed #162106

Not sure if it makes sense to also do it in maps. @nreese wdyt?

@stratoula stratoula added the Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) label Jul 18, 2023
stratoula added a commit that referenced this issue Jul 18, 2023
## Summary

Closes #162069

Fixes the validation error on the content management service if the
description is set to null.

I am not sure how the description can be set to null. If I create a Lens
so in 7.17 and I don't set the description then it is automatically set
to '' (empty string)

I can think of 2 ways:
- It was possible in older kibana versions
- Someone changed the SO manually and set this to null

This change fixes it with allowing the schema to also set nullable
values.

Note: Maybe covers the undefined case.

To test it just import the SO given by Bhavya here
#162069

<img width="2496" alt="image"
src="https://github.com/elastic/kibana/assets/17003240/481ef105-2efb-47c0-9d06-94f7fddbf703">
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Jul 18, 2023
## Summary

Closes elastic#162069

Fixes the validation error on the content management service if the
description is set to null.

I am not sure how the description can be set to null. If I create a Lens
so in 7.17 and I don't set the description then it is automatically set
to '' (empty string)

I can think of 2 ways:
- It was possible in older kibana versions
- Someone changed the SO manually and set this to null

This change fixes it with allowing the schema to also set nullable
values.

Note: Maybe covers the undefined case.

To test it just import the SO given by Bhavya here
elastic#162069

<img width="2496" alt="image"
src="https://github.com/elastic/kibana/assets/17003240/481ef105-2efb-47c0-9d06-94f7fddbf703">

(cherry picked from commit 2e1d36a)
kibanamachine added a commit that referenced this issue Jul 18, 2023
# Backport

This will backport the following commits from `main` to `8.9`:
- [Fix bug on null description
(#162106)](#162106)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-07-18T09:08:34Z","message":"Fix
bug on null description (#162106)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/162069\r\n\r\nFixes the
validation error on the content management service if the\r\ndescription
is set to null.\r\n\r\nI am not sure how the description can be set to
null. If I create a Lens\r\nso in 7.17 and I don't set the description
then it is automatically set\r\nto '' (empty string)\r\n\r\nI can think
of 2 ways:\r\n- It was possible in older kibana versions\r\n- Someone
changed the SO manually and set this to null\r\n\r\nThis change fixes it
with allowing the schema to also set nullable\r\nvalues.\r\n\r\nNote:
Maybe covers the undefined case.\r\n\r\nTo test it just import the SO
given by Bhavya
here\r\nhttps://github.com//issues/162069\r\n\r\n<img
width=\"2496\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/17003240/481ef105-2efb-47c0-9d06-94f7fddbf703\">","sha":"2e1d36a10a0f718a59672b21858c430648831322","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","backport:prev-minor","v8.9.0","v8.10.0"],"number":162106,"url":"https://github.com/elastic/kibana/pull/162106","mergeCommit":{"message":"Fix
bug on null description (#162106)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/162069\r\n\r\nFixes the
validation error on the content management service if the\r\ndescription
is set to null.\r\n\r\nI am not sure how the description can be set to
null. If I create a Lens\r\nso in 7.17 and I don't set the description
then it is automatically set\r\nto '' (empty string)\r\n\r\nI can think
of 2 ways:\r\n- It was possible in older kibana versions\r\n- Someone
changed the SO manually and set this to null\r\n\r\nThis change fixes it
with allowing the schema to also set nullable\r\nvalues.\r\n\r\nNote:
Maybe covers the undefined case.\r\n\r\nTo test it just import the SO
given by Bhavya
here\r\nhttps://github.com//issues/162069\r\n\r\n<img
width=\"2496\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/17003240/481ef105-2efb-47c0-9d06-94f7fddbf703\">","sha":"2e1d36a10a0f718a59672b21858c430648831322"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/162106","number":162106,"mergeCommit":{"message":"Fix
bug on null description (#162106)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/162069\r\n\r\nFixes the
validation error on the content management service if the\r\ndescription
is set to null.\r\n\r\nI am not sure how the description can be set to
null. If I create a Lens\r\nso in 7.17 and I don't set the description
then it is automatically set\r\nto '' (empty string)\r\n\r\nI can think
of 2 ways:\r\n- It was possible in older kibana versions\r\n- Someone
changed the SO manually and set this to null\r\n\r\nThis change fixes it
with allowing the schema to also set nullable\r\nvalues.\r\n\r\nNote:
Maybe covers the undefined case.\r\n\r\nTo test it just import the SO
given by Bhavya
here\r\nhttps://github.com//issues/162069\r\n\r\n<img
width=\"2496\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/17003240/481ef105-2efb-47c0-9d06-94f7fddbf703\">","sha":"2e1d36a10a0f718a59672b21858c430648831322"}}]}]
BACKPORT-->

Co-authored-by: Stratoula Kalafateli <[email protected]>
@nreese
Copy link
Contributor

nreese commented Jul 18, 2023

Not sure if it makes sense to also do it in maps. @nreese wdyt?

I think it does, for consistency. I can put up a PR with the change. Thanks for pointing this out

@nreese
Copy link
Contributor

nreese commented Jul 18, 2023

Created #162145

nreese added a commit that referenced this issue Jul 18, 2023
Part of #162069

> This happens in maps too and possibly other SOs that have null
description (not sure if it were ever possible to have null description
in maps.) It seems from the SOs that Bhavya sent that it was possible
for visualizations. With this schema change the bug if fixed
#162106

> Not sure if it makes sense to also do it in maps. @nreese wdyt?

Add support for null description in maps saved object to be consistent
with visualize saved objects.

### test instructions
1) Install web logs sample data set
2) export map
3) manually change ndjson, changing `description:""` to
`description:null`
4) reimport map saved object
5) verify map can be opened

---------

Co-authored-by: Kibana Machine <[email protected]>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Jul 18, 2023
Part of elastic#162069

> This happens in maps too and possibly other SOs that have null
description (not sure if it were ever possible to have null description
in maps.) It seems from the SOs that Bhavya sent that it was possible
for visualizations. With this schema change the bug if fixed
elastic#162106

> Not sure if it makes sense to also do it in maps. @nreese wdyt?

Add support for null description in maps saved object to be consistent
with visualize saved objects.

### test instructions
1) Install web logs sample data set
2) export map
3) manually change ndjson, changing `description:""` to
`description:null`
4) reimport map saved object
5) verify map can be opened

---------

Co-authored-by: Kibana Machine <[email protected]>
(cherry picked from commit b222f7a)
kibanamachine referenced this issue Jul 18, 2023
)

# Backport

This will backport the following commits from `main` to `8.9`:
- [[maps] support null description in saved object
(#162145)](#162145)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Nathan
Reese","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-07-18T17:10:11Z","message":"[maps]
support null description in saved object (#162145)\n\nPart of
https://github.com/elastic/kibana/issues/162069\r\n\r\n> This happens in
maps too and possibly other SOs that have null\r\ndescription (not sure
if it were ever possible to have null description\r\nin maps.) It seems
from the SOs that Bhavya sent that it was possible\r\nfor
visualizations. With this schema change the bug if
fixed\r\nhttps://github.com//pull/162106\r\n\r\n> Not sure
if it makes sense to also do it in maps. @nreese wdyt?\r\n\r\nAdd
support for null description in maps saved object to be
consistent\r\nwith visualize saved objects.\r\n\r\n### test
instructions\r\n1) Install web logs sample data set\r\n2) export
map\r\n3) manually change ndjson, changing `description:\"\"`
to\r\n`description:null`\r\n4) reimport map saved object\r\n5) verify
map can be opened\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<[email protected]>","sha":"b222f7a7d1d8a9e994a4f8293a56afa0b363c645","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","Feature:Maps","v8.10.0","v8.9.1"],"number":162145,"url":"https://github.com/elastic/kibana/pull/162145","mergeCommit":{"message":"[maps]
support null description in saved object (#162145)\n\nPart of
https://github.com/elastic/kibana/issues/162069\r\n\r\n> This happens in
maps too and possibly other SOs that have null\r\ndescription (not sure
if it were ever possible to have null description\r\nin maps.) It seems
from the SOs that Bhavya sent that it was possible\r\nfor
visualizations. With this schema change the bug if
fixed\r\nhttps://github.com//pull/162106\r\n\r\n> Not sure
if it makes sense to also do it in maps. @nreese wdyt?\r\n\r\nAdd
support for null description in maps saved object to be
consistent\r\nwith visualize saved objects.\r\n\r\n### test
instructions\r\n1) Install web logs sample data set\r\n2) export
map\r\n3) manually change ndjson, changing `description:\"\"`
to\r\n`description:null`\r\n4) reimport map saved object\r\n5) verify
map can be opened\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<[email protected]>","sha":"b222f7a7d1d8a9e994a4f8293a56afa0b363c645"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/162145","number":162145,"mergeCommit":{"message":"[maps]
support null description in saved object (#162145)\n\nPart of
https://github.com/elastic/kibana/issues/162069\r\n\r\n> This happens in
maps too and possibly other SOs that have null\r\ndescription (not sure
if it were ever possible to have null description\r\nin maps.) It seems
from the SOs that Bhavya sent that it was possible\r\nfor
visualizations. With this schema change the bug if
fixed\r\nhttps://github.com//pull/162106\r\n\r\n> Not sure
if it makes sense to also do it in maps. @nreese wdyt?\r\n\r\nAdd
support for null description in maps saved object to be
consistent\r\nwith visualize saved objects.\r\n\r\n### test
instructions\r\n1) Install web logs sample data set\r\n2) export
map\r\n3) manually change ndjson, changing `description:\"\"`
to\r\n`description:null`\r\n4) reimport map saved object\r\n5) verify
map can be opened\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<[email protected]>","sha":"b222f7a7d1d8a9e994a4f8293a56afa0b363c645"}},{"branch":"8.9","label":"v8.9.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Nathan Reese <[email protected]>
ThomThomson pushed a commit to ThomThomson/kibana that referenced this issue Aug 1, 2023
## Summary

Closes elastic#162069

Fixes the validation error on the content management service if the
description is set to null.

I am not sure how the description can be set to null. If I create a Lens
so in 7.17 and I don't set the description then it is automatically set
to '' (empty string)

I can think of 2 ways:
- It was possible in older kibana versions
- Someone changed the SO manually and set this to null

This change fixes it with allowing the schema to also set nullable
values.

Note: Maybe covers the undefined case.

To test it just import the SO given by Bhavya here
elastic#162069

<img width="2496" alt="image"
src="https://github.com/elastic/kibana/assets/17003240/481ef105-2efb-47c0-9d06-94f7fddbf703">
ThomThomson pushed a commit to ThomThomson/kibana that referenced this issue Aug 1, 2023
Part of elastic#162069

> This happens in maps too and possibly other SOs that have null
description (not sure if it were ever possible to have null description
in maps.) It seems from the SOs that Bhavya sent that it was possible
for visualizations. With this schema change the bug if fixed
elastic#162106

> Not sure if it makes sense to also do it in maps. @nreese wdyt?

Add support for null description in maps saved object to be consistent
with visualize saved objects.

### test instructions
1) Install web logs sample data set
2) export map
3) manually change ndjson, changing `description:""` to
`description:null`
4) reimport map saved object
5) verify map can be opened

---------

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Fixes for quality problems that affect the customer experience Feature:Lens regression Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants