Skip to content

Comments

[Discover] Return namespaces from update (#212574)#226569

Merged
AlexGPlay merged 2 commits intoelastic:mainfrom
AlexGPlay:212574-add-namespaces-to-update-return
Jul 10, 2025
Merged

[Discover] Return namespaces from update (#212574)#226569
AlexGPlay merged 2 commits intoelastic:mainfrom
AlexGPlay:212574-add-namespaces-to-update-return

Conversation

@AlexGPlay
Copy link
Contributor

@AlexGPlay AlexGPlay commented Jul 4, 2025

Summary

Closes #212574

Right now the update response doesn't return namespaces. The typing of the query assumes it's always going to be there so we have to return it when we update the query.

Server response

Before After
image image

Before

delete_saved_query_before.mov

After

delete_saved_query_now.mov

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

@AlexGPlay AlexGPlay self-assigned this Jul 4, 2025
@AlexGPlay AlexGPlay added release_note:fix Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// labels Jul 4, 2025
@AlexGPlay AlexGPlay marked this pull request as ready for review July 4, 2025 13:56
@AlexGPlay AlexGPlay requested review from a team as code owners July 4, 2025 13:56
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@davismcphee
Copy link
Contributor

Gonna request a review from @lukasolson for this one since he reported the original issue and seems to have a pretty good idea of what was going on here.

@davismcphee davismcphee requested a review from lukasolson July 5, 2025 02:02
Copy link
Contributor

@lukasolson lukasolson left a comment

Choose a reason for hiding this comment

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

LGTM!

@AlexGPlay AlexGPlay force-pushed the 212574-add-namespaces-to-update-return branch from bc9d7ee to f1bc910 Compare July 10, 2025 06:22
@AlexGPlay AlexGPlay added backport:version Backport to applied version labels v9.1.0 v8.19.0 labels Jul 10, 2025
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

cc @AlexGPlay

@AlexGPlay AlexGPlay merged commit c71d562 into elastic:main Jul 10, 2025
18 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

https://github.com/elastic/kibana/actions/runs/16189911487

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 10, 2025
…6569)

## Summary

Closes elastic#212574

Right now the update response doesn't return namespaces. The typing of
the query assumes it's always going to be there so we have to return it
when we update the query.

Server response
--
| Before | After |
|--------|------|
|
![image](https://github.com/user-attachments/assets/c089c7fb-acc9-412f-9553-aff759e81df2)
|
![image](https://github.com/user-attachments/assets/73a231ba-1390-4527-9dbe-5c117d4e6e84)
|

---

Before

https://github.com/user-attachments/assets/8fd760c1-733d-42ac-9bf8-2bb9259aa23d

After

https://github.com/user-attachments/assets/e38586c8-78db-4093-ae8b-0f7310665308

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

(cherry picked from commit c71d562)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 10, 2025
…6569)

## Summary

Closes elastic#212574

Right now the update response doesn't return namespaces. The typing of
the query assumes it's always going to be there so we have to return it
when we update the query.

Server response
--
| Before | After |
|--------|------|
|
![image](https://github.com/user-attachments/assets/c089c7fb-acc9-412f-9553-aff759e81df2)
|
![image](https://github.com/user-attachments/assets/73a231ba-1390-4527-9dbe-5c117d4e6e84)
|

---

Before

https://github.com/user-attachments/assets/8fd760c1-733d-42ac-9bf8-2bb9259aa23d

After

https://github.com/user-attachments/assets/e38586c8-78db-4093-ae8b-0f7310665308

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

(cherry picked from commit c71d562)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19
9.1

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jul 10, 2025
…227369)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Discover] Return namespaces from update (#212574)
(#226569)](#226569)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Alejandro García
Parrondo","email":"31973472+AlexGPlay@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-10T08:20:23Z","message":"[Discover]
Return namespaces from update (#212574) (#226569)\n\n##
Summary\n\nCloses
https://github.com/elastic/kibana/issues/212574\n\nRight now the update
response doesn't return namespaces. The typing of\nthe query assumes
it's always going to be there so we have to return it\nwhen we update
the query.\n\nServer response\n--\n| Before | After
|\n|--------|------|\n|\n![image](https://github.com/user-attachments/assets/c089c7fb-acc9-412f-9553-aff759e81df2)\n|\n![image](https://github.com/user-attachments/assets/73a231ba-1390-4527-9dbe-5c117d4e6e84)\n|\n\n---\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/8fd760c1-733d-42ac-9bf8-2bb9259aa23d\n\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/e38586c8-78db-4093-ae8b-0f7310665308\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this
PR introduce any risks? For example, consider risks like hard\nto test
bugs, performance regression, potential of data loss.\n\nDescribe the
risk, its severity, and mitigation for each identified\nrisk. Invite
stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See
some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ]
...","sha":"c71d5624cc87498100d24937defeb473b1549126","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Discover]
Return namespaces from update
(#212574)","number":226569,"url":"https://github.com/elastic/kibana/pull/226569","mergeCommit":{"message":"[Discover]
Return namespaces from update (#212574) (#226569)\n\n##
Summary\n\nCloses
https://github.com/elastic/kibana/issues/212574\n\nRight now the update
response doesn't return namespaces. The typing of\nthe query assumes
it's always going to be there so we have to return it\nwhen we update
the query.\n\nServer response\n--\n| Before | After
|\n|--------|------|\n|\n![image](https://github.com/user-attachments/assets/c089c7fb-acc9-412f-9553-aff759e81df2)\n|\n![image](https://github.com/user-attachments/assets/73a231ba-1390-4527-9dbe-5c117d4e6e84)\n|\n\n---\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/8fd760c1-733d-42ac-9bf8-2bb9259aa23d\n\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/e38586c8-78db-4093-ae8b-0f7310665308\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this
PR introduce any risks? For example, consider risks like hard\nto test
bugs, performance regression, potential of data loss.\n\nDescribe the
risk, its severity, and mitigation for each identified\nrisk. Invite
stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See
some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ]
...","sha":"c71d5624cc87498100d24937defeb473b1549126"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/226569","number":226569,"mergeCommit":{"message":"[Discover]
Return namespaces from update (#212574) (#226569)\n\n##
Summary\n\nCloses
https://github.com/elastic/kibana/issues/212574\n\nRight now the update
response doesn't return namespaces. The typing of\nthe query assumes
it's always going to be there so we have to return it\nwhen we update
the query.\n\nServer response\n--\n| Before | After
|\n|--------|------|\n|\n![image](https://github.com/user-attachments/assets/c089c7fb-acc9-412f-9553-aff759e81df2)\n|\n![image](https://github.com/user-attachments/assets/73a231ba-1390-4527-9dbe-5c117d4e6e84)\n|\n\n---\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/8fd760c1-733d-42ac-9bf8-2bb9259aa23d\n\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/e38586c8-78db-4093-ae8b-0f7310665308\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this
PR introduce any risks? For example, consider risks like hard\nto test
bugs, performance regression, potential of data loss.\n\nDescribe the
risk, its severity, and mitigation for each identified\nrisk. Invite
stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See
some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...","sha":"c71d5624cc87498100d24937defeb473b1549126"}}]}]
BACKPORT-->

Co-authored-by: Alejandro García Parrondo <31973472+AlexGPlay@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Jul 10, 2025
…227368)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Discover] Return namespaces from update (#212574)
(#226569)](#226569)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Alejandro García
Parrondo","email":"31973472+AlexGPlay@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-10T08:20:23Z","message":"[Discover]
Return namespaces from update (#212574) (#226569)\n\n##
Summary\n\nCloses
https://github.com/elastic/kibana/issues/212574\n\nRight now the update
response doesn't return namespaces. The typing of\nthe query assumes
it's always going to be there so we have to return it\nwhen we update
the query.\n\nServer response\n--\n| Before | After
|\n|--------|------|\n|\n![image](https://github.com/user-attachments/assets/c089c7fb-acc9-412f-9553-aff759e81df2)\n|\n![image](https://github.com/user-attachments/assets/73a231ba-1390-4527-9dbe-5c117d4e6e84)\n|\n\n---\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/8fd760c1-733d-42ac-9bf8-2bb9259aa23d\n\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/e38586c8-78db-4093-ae8b-0f7310665308\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this
PR introduce any risks? For example, consider risks like hard\nto test
bugs, performance regression, potential of data loss.\n\nDescribe the
risk, its severity, and mitigation for each identified\nrisk. Invite
stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See
some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ]
...","sha":"c71d5624cc87498100d24937defeb473b1549126","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Discover]
Return namespaces from update
(#212574)","number":226569,"url":"https://github.com/elastic/kibana/pull/226569","mergeCommit":{"message":"[Discover]
Return namespaces from update (#212574) (#226569)\n\n##
Summary\n\nCloses
https://github.com/elastic/kibana/issues/212574\n\nRight now the update
response doesn't return namespaces. The typing of\nthe query assumes
it's always going to be there so we have to return it\nwhen we update
the query.\n\nServer response\n--\n| Before | After
|\n|--------|------|\n|\n![image](https://github.com/user-attachments/assets/c089c7fb-acc9-412f-9553-aff759e81df2)\n|\n![image](https://github.com/user-attachments/assets/73a231ba-1390-4527-9dbe-5c117d4e6e84)\n|\n\n---\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/8fd760c1-733d-42ac-9bf8-2bb9259aa23d\n\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/e38586c8-78db-4093-ae8b-0f7310665308\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this
PR introduce any risks? For example, consider risks like hard\nto test
bugs, performance regression, potential of data loss.\n\nDescribe the
risk, its severity, and mitigation for each identified\nrisk. Invite
stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See
some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ]
...","sha":"c71d5624cc87498100d24937defeb473b1549126"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/226569","number":226569,"mergeCommit":{"message":"[Discover]
Return namespaces from update (#212574) (#226569)\n\n##
Summary\n\nCloses
https://github.com/elastic/kibana/issues/212574\n\nRight now the update
response doesn't return namespaces. The typing of\nthe query assumes
it's always going to be there so we have to return it\nwhen we update
the query.\n\nServer response\n--\n| Before | After
|\n|--------|------|\n|\n![image](https://github.com/user-attachments/assets/c089c7fb-acc9-412f-9553-aff759e81df2)\n|\n![image](https://github.com/user-attachments/assets/73a231ba-1390-4527-9dbe-5c117d4e6e84)\n|\n\n---\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/8fd760c1-733d-42ac-9bf8-2bb9259aa23d\n\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/e38586c8-78db-4093-ae8b-0f7310665308\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this
PR introduce any risks? For example, consider risks like hard\nto test
bugs, performance regression, potential of data loss.\n\nDescribe the
risk, its severity, and mitigation for each identified\nrisk. Invite
stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See
some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...","sha":"c71d5624cc87498100d24937defeb473b1549126"}}]}]
BACKPORT-->

Co-authored-by: Alejandro García Parrondo <31973472+AlexGPlay@users.noreply.github.com>
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
…6569)

## Summary

Closes elastic#212574

Right now the update response doesn't return namespaces. The typing of
the query assumes it's always going to be there so we have to return it
when we update the query.

Server response
--
| Before | After |
|--------|------|
|
![image](https://github.com/user-attachments/assets/c089c7fb-acc9-412f-9553-aff759e81df2)
|
![image](https://github.com/user-attachments/assets/73a231ba-1390-4527-9dbe-5c117d4e6e84)
|

---

Before


https://github.com/user-attachments/assets/8fd760c1-733d-42ac-9bf8-2bb9259aa23d


After


https://github.com/user-attachments/assets/e38586c8-78db-4093-ae8b-0f7310665308


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:fix Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v8.19.0 v9.1.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Saved Queries] Updating then deleting a saved query results in error

6 participants