Skip to content

[Console] Fix ndjson output#280156

Merged
sabarasaba merged 8 commits into
elastic:mainfrom
sabarasaba:console-fix_ndjson_output
Jul 25, 2026
Merged

[Console] Fix ndjson output#280156
sabarasaba merged 8 commits into
elastic:mainfrom
sabarasaba:console-fix_ndjson_output

Conversation

@sabarasaba

@sabarasaba sabarasaba commented Jul 22, 2026

Copy link
Copy Markdown
Member

Closes #235913

Summary

This PR adds support for ndjson output in consoles output panel

How to test

  • start es and kibana
  • add all sample data
  • go to console
  • run GET kbn://api/saved_objects/_find?per_page=10 find any saved object and copy its id
  • run
POST kbn://api/saved_objects/_export
{
  "objects": [
    {
      "id": "<id from the find result>",
      "type": "dashboard"
    }
  ],
  "excludeExportDetails": true,
  "includeReferencesDeep": false
}

And it should show you the response as json (this was previously broken)

@sabarasaba sabarasaba self-assigned this Jul 22, 2026
@sabarasaba sabarasaba added Feature:Console Dev Tools Console Feature Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels v9.5.0 v9.4.5 labels Jul 22, 2026
@sabarasaba

Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

@sabarasaba
sabarasaba marked this pull request as ready for review July 23, 2026 05:29
@sabarasaba
sabarasaba requested a review from a team as a code owner July 23, 2026 05:29
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/kibana-management (Team:Kibana Management)

@damian-polewski damian-polewski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @sabarasaba, I was testing the flow and I still get an empty response when exporting a saved object. Am I missing something?

Screenshot 2026-07-24 at 13 21 14

@sabarasaba

Copy link
Copy Markdown
Member Author

Hi @sabarasaba, I was testing the flow and I still get an empty response when exporting a saved object. Am I missing something?

odd i just tried it out and it works.. can you inspect the api call in the network request see what you see?

Screenshot 2026-07-24 at 15 11 45

@damian-polewski damian-polewski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think I tested it on a wrong branch by accident. I retested the flow right now and everything works as expected! I added another small nit but overall LGTM!

@sabarasaba
sabarasaba enabled auto-merge (squash) July 25, 2026 05:55
@kibanamachine

Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #85 / Cloud Security Posture - Group 2 (Findings) "after all" hook: afterTestSuite.trigger in "Cloud Security Posture - Group 2 (Findings)"
  • [job] [logs] FTR Configs #85 / Cloud Security Posture - Group 2 (Findings) Findings Page - Grouping "after all" hook in "Findings Page - Grouping"
  • [job] [logs] FTR Configs #85 / Cloud Security Posture - Group 2 (Findings) Findings Page - Grouping "before all" hook in "Findings Page - Grouping"
  • [job] [logs] Scout Lane #8 - stateful-classic / default / local-stateful-classic - DefaultEmailSettings - configures email connector and validates settings
  • [job] [logs] Scout Lane #10 - stateful-classic / default / local-stateful-classic - Entity attachment cases – flyout add-to-case actions and Entities accordion - Entities accordion renders when entity attachments were added via API
  • [job] [logs] Scout Lane #10 - stateful-classic / default / local-stateful-classic - Entity attachment cases – flyout add-to-case actions and Entities accordion - renders no Entities accordion when a case has no entity attachments
  • [job] [logs] FTR Configs #138 / machine learning - data frame analytics - group 1 "after all" hook: afterTestSuite.trigger in "machine learning - data frame analytics - group 1"
  • [job] [logs] FTR Configs #138 / machine learning - data frame analytics - group 1 custom urls "after all" hook in "custom urls"
  • [job] [logs] FTR Configs #138 / machine learning - data frame analytics - group 1 custom urls "before all" hook in "custom urls"

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
console 280.6KB 281.0KB +352.0B

History

cc @sabarasaba

@sabarasaba
sabarasaba merged commit 68d2f14 into elastic:main Jul 25, 2026
48 of 51 checks passed
@kibanamachine

Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.4, 9.5

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

@kibanamachine

Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
9.4
9.5

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 25, 2026
# Backport

This will backport the following commits from `main` to `9.5`:
- [[Console] Fix ndjson output
(#280156)](#280156)

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

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

<!--BACKPORT [{"author":{"name":"Ignacio
Rivas","email":"rivasign@gmail.com"},"sourceCommit":{"committedDate":"2026-07-25T06:56:27Z","message":"[Console]
Fix ndjson output
(#280156)","sha":"68d2f14a1c00f34c11a9fa51d75367a3f3835e97","branchLabelMapping":{"^v9.6.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Console","Team:Kibana
Management","release_note:skip","backport:version","v9.5.0","v9.6.0","v9.4.5"],"title":"[Console]
Fix ndjson
output","number":280156,"url":"https://github.com/elastic/kibana/pull/280156","mergeCommit":{"message":"[Console]
Fix ndjson output
(#280156)","sha":"68d2f14a1c00f34c11a9fa51d75367a3f3835e97"}},"sourceBranch":"main","suggestedTargetBranches":["9.5","9.4"],"targetPullRequestStates":[{"branch":"9.5","label":"v9.5.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.6.0","branchLabelMappingKey":"^v9.6.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/280156","number":280156,"mergeCommit":{"message":"[Console]
Fix ndjson output
(#280156)","sha":"68d2f14a1c00f34c11a9fa51d75367a3f3835e97"}},{"branch":"9.4","label":"v9.4.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Ignacio Rivas <rivasign@gmail.com>
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 Feature:Console Dev Tools Console Feature release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v9.4.5 v9.5.0 v9.6.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement Request] Support for ndjson output in Kibana's Dev Tools > Console

4 participants