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

Calling the watcher Get watch API endpoint generate malformed json #152865

Open
frconil opened this issue Feb 24, 2023 · 5 comments
Open

Calling the watcher Get watch API endpoint generate malformed json #152865

frconil opened this issue Feb 24, 2023 · 5 comments
Labels
bug Fixes for quality problems that affect the customer experience Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@frconil
Copy link
Contributor

frconil commented Feb 24, 2023

Elasticsearch Version

8.6.1

Installed Plugins

No response

Java Version

bundled

OS Version

ESS

Problem Description

When using the Get watch API endpoint to export current watches, the JSON generated may not pass validation in either Dev Tools or the Kibana watcher UI.

In particular, this happens in triple quoted strings (e.g. """ delimited strings) terminated by a single ". For instance this is a line being generated by the API output:

"query_string": {
  "query": """("term" OR "myotherterm") AND "condition" AND NOT "othercondition""""
}

This line will trigger in error in both dev tools or the watcher interface reporting it as invalid json.

this fixed line works:

"query_string": {
  "query": """("term" OR "myotherterm") AND "condition" AND NOT "othercondition" """
}

Steps to Reproduce

Create a watch where the query is delimited by """. Export this watch with:

GET _watcher/watch/<watch_id>

Try and import the content of the _source object with PUT _watcher/watch/<watch_id> {<source>}.

Logs (if relevant)

Untitled

@elasticsearchmachine
Copy link

Pinging @elastic/es-data-management (Team:Data Management)

@dakrone dakrone transferred this issue from elastic/elasticsearch Mar 7, 2023
@dakrone
Copy link
Member

dakrone commented Mar 7, 2023

I've transferred this to the Kibana repository, as Elasticsearch itself does not generate any JSON using triple-quotes ("""). I suspect this is something related to the Dev Console within Kibana.

@botelastic botelastic bot added the needs-team Issues missing a team label label Mar 7, 2023
@dmlemeshko dmlemeshko added Feature:Console Dev Tools Console Feature Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Mar 9, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/platform-deployment-management (Team:Deployment Management)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Mar 9, 2023
@ElenaStoeva
Copy link
Contributor

Might be related to #13528

@ElenaStoeva ElenaStoeva added the bug Fixes for quality problems that affect the customer experience label Apr 3, 2023
@alisonelizabeth alisonelizabeth removed the Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more label Sep 17, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Sep 17, 2024
@alisonelizabeth alisonelizabeth added Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more and removed Feature:Console Dev Tools Console Feature labels Sep 17, 2024
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label Sep 17, 2024
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 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

No branches or pull requests

8 participants