Skip to content

[Obs AI Assistant] Remove ES|QL escaping for index names#183028

Merged
dgieselaar merged 3 commits intoelastic:mainfrom
dgieselaar:obs-ai-assistant-esql-error-messages
May 9, 2024
Merged

[Obs AI Assistant] Remove ES|QL escaping for index names#183028
dgieselaar merged 3 commits intoelastic:mainfrom
dgieselaar:obs-ai-assistant-esql-error-messages

Conversation

@dgieselaar
Copy link
Copy Markdown
Contributor

@dgieselaar dgieselaar commented May 9, 2024

There were some last minute changes to ES|QL that will ship in 8.14 that we need to take into account:

I'm also including a change that translates = to == in WHERE commands, and more useful error messages (map a syntax error to the command where it occurred).

As BUCKET is often used for timeseries data and we replaced single and double quotes around index names with backticks, this introduces a high chance of generating syntactically invalid queries. This PR updates the docs and examples and removes the correction from " and ' to "`"

@dgieselaar dgieselaar added bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes v8.14.0 labels May 9, 2024
@dgieselaar dgieselaar self-assigned this May 9, 2024
@dgieselaar dgieselaar requested a review from a team as a code owner May 9, 2024 11:07
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:Obs AI Assistant Observability AI Assistant labels May 9, 2024
@ghost
Copy link
Copy Markdown

ghost commented May 9, 2024

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@dgieselaar dgieselaar enabled auto-merge (squash) May 9, 2024 11:19
@kibana-ci
Copy link
Copy Markdown

kibana-ci commented May 9, 2024

💚 Build Succeeded

Metrics [docs]

Canvas Sharable Runtime

The Canvas "shareable runtime" is an bundle produced to enable running Canvas workpads outside of Kibana. This bundle is included in third-party webpages that embed canvas and therefor should be as slim as possible.

id before after diff
module count - 5407 +5407
total size - 8.8MB +8.8MB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @dgieselaar

@dgieselaar dgieselaar merged commit 6004cad into elastic:main May 9, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 9, 2024
)

There were some last minute changes to ES|QL that will ship in 8.14 that
we need to take into account:

- [BUCKET is now an aggregation
function](elastic/elasticsearch#107272)
- [index names can no longer be escaped with backticks
](elastic/elasticsearch#108431)

I'm also including a change that translates `=` to `==` in WHERE
commands, and more useful error messages (map a syntax error to the
command where it occurred).

As BUCKET is often used for timeseries data and we replaced single and
double quotes around index names with backticks, this introduces a high
chance of generating syntactically invalid queries. This PR updates the
docs and examples and removes the correction from `"` and `'` to "`"

(cherry picked from commit 6004cad)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.14

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

Questions ?

Please refer to the Backport tool documentation

@dgieselaar dgieselaar deleted the obs-ai-assistant-esql-error-messages branch May 9, 2024 12:41
kibanamachine added a commit that referenced this pull request May 9, 2024
) (#183037)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[Obs AI Assistant] Remove ES|QL escaping for index names
(#183028)](#183028)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Dario
Gieselaar","email":"dario.gieselaar@elastic.co"},"sourceCommit":{"committedDate":"2024-05-09T12:15:34Z","message":"[Obs
AI Assistant] Remove ES|QL escaping for index names (#183028)\n\nThere
were some last minute changes to ES|QL that will ship in 8.14 that\r\nwe
need to take into account:\r\n\r\n- [BUCKET is now an
aggregation\r\nfunction](https://github.com/elastic/elasticsearch/pull/107272)\r\n-
[index names can no longer be escaped with
backticks\r\n](https://github.com/elastic/elasticsearch/pull/108431)\r\n\r\nI'm
also including a change that translates `=` to `==` in
WHERE\r\ncommands, and more useful error messages (map a syntax error to
the\r\ncommand where it occurred).\r\n\r\nAs BUCKET is often used for
timeseries data and we replaced single and\r\ndouble quotes around index
names with backticks, this introduces a high\r\nchance of generating
syntactically invalid queries. This PR updates the\r\ndocs and examples
and removes the correction from `\"` and `'` to
\"`\"","sha":"6004cad53af71564b756e116b6b769a9d595dad6","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:Obs
AI
Assistant","ci:project-deploy-observability","v8.14.0","v8.15.0"],"title":"[Obs
AI Assistant] Remove ES|QL escaping for index
names","number":183028,"url":"https://github.com/elastic/kibana/pull/183028","mergeCommit":{"message":"[Obs
AI Assistant] Remove ES|QL escaping for index names (#183028)\n\nThere
were some last minute changes to ES|QL that will ship in 8.14 that\r\nwe
need to take into account:\r\n\r\n- [BUCKET is now an
aggregation\r\nfunction](https://github.com/elastic/elasticsearch/pull/107272)\r\n-
[index names can no longer be escaped with
backticks\r\n](https://github.com/elastic/elasticsearch/pull/108431)\r\n\r\nI'm
also including a change that translates `=` to `==` in
WHERE\r\ncommands, and more useful error messages (map a syntax error to
the\r\ncommand where it occurred).\r\n\r\nAs BUCKET is often used for
timeseries data and we replaced single and\r\ndouble quotes around index
names with backticks, this introduces a high\r\nchance of generating
syntactically invalid queries. This PR updates the\r\ndocs and examples
and removes the correction from `\"` and `'` to
\"`\"","sha":"6004cad53af71564b756e116b6b769a9d595dad6"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/183028","number":183028,"mergeCommit":{"message":"[Obs
AI Assistant] Remove ES|QL escaping for index names (#183028)\n\nThere
were some last minute changes to ES|QL that will ship in 8.14 that\r\nwe
need to take into account:\r\n\r\n- [BUCKET is now an
aggregation\r\nfunction](https://github.com/elastic/elasticsearch/pull/107272)\r\n-
[index names can no longer be escaped with
backticks\r\n](https://github.com/elastic/elasticsearch/pull/108431)\r\n\r\nI'm
also including a change that translates `=` to `==` in
WHERE\r\ncommands, and more useful error messages (map a syntax error to
the\r\ncommand where it occurred).\r\n\r\nAs BUCKET is often used for
timeseries data and we replaced single and\r\ndouble quotes around index
names with backticks, this introduces a high\r\nchance of generating
syntactically invalid queries. This PR updates the\r\ndocs and examples
and removes the correction from `\"` and `'` to
\"`\"","sha":"6004cad53af71564b756e116b6b769a9d595dad6"}}]}] BACKPORT-->

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
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 ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:Obs AI Assistant Observability AI Assistant v8.14.0 v8.15.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants