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

[ES|QL] Warning in console due to the new translation changes #184872

Closed
bhavyarm opened this issue Jun 5, 2024 · 7 comments · Fixed by #184926
Closed

[ES|QL] Warning in console due to the new translation changes #184872

bhavyarm opened this issue Jun 5, 2024 · 7 comments · Fixed by #184926
Labels
Feature:ES|QL ES|QL related features in Kibana impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:needs-research This issue requires some research before it can be worked on or estimated Team:ESQL ES|QL related features in Kibana technical debt Improvement of the software architecture and operational architecture

Comments

@bhavyarm
Copy link
Contributor

bhavyarm commented Jun 5, 2024

Kibana version: main [serverless-qa-observability]

Browser version: chrome latest

Browser OS version: OS X

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

Describe the bug: Kibana is printing the below error in the browser console on serverless-qa-observability project. The location is dashboards.

Errors in browser console (if relevant):

Error Parsing translation string. This will start throwing an error once the i18n package tooling is upgraded.
Pt @ core.entry.js:16
core.entry.js:16 Error: [@formatjs/intl Error FORMAT_ERROR] Error formatting default message for: "textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.grok.markdown", rendering default message verbatim
MessageID: textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.grok.markdown
Default Message: ### GROK
`GROK` enables you to extract structured data out of a string. `GROK` matches the string against patterns, based on regular expressions, and extracts the specified patterns as columns.

Refer to the [grok processor documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html) for the syntax of grok patterns.


ROW a = "12 15.5 15.6 true"
| GROK a "%\{NUMBER:b:int\} %\{NUMBER:c:float\} %\{NUMBER:d:double\} %\{WORD:e:boolean\}"

            
Description: Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)

Locale: en


MALFORMED_ARGUMENT
SyntaxError: MALFORMED_ARGUMENT
    at Function.oe [as __parse] (kbn-ui-shared-deps-src.js:1:1065977)
    at e (kbn-ui-shared-deps-src.js:43:186708)
    at kbn-ui-shared-deps-src.js:1:993513
    at o (kbn-ui-shared-deps-src.js:1:973830)
    at h (kbn-ui-shared-deps-src.js:9:11537)
    at Module.m (kbn-ui-shared-deps-src.js:1:185142)
    at 56 (textBasedLanguages.chunk.2.js:1:12069)
    at o (textBasedLanguages.plugin.js:1:361)
    at async textBasedLanguages.chunk.1.js:1:53347
    at async textBasedLanguages.chunk.1.js:1:53157
    at t [as constructor] (kbn-ui-shared-deps-src.js:1:880199)
    at new t (kbn-ui-shared-deps-src.js:1:880374)
    at h (kbn-ui-shared-deps-src.js:9:11591)
    at Module.m (kbn-ui-shared-deps-src.js:1:185142)
    at 56 (textBasedLanguages.chunk.2.js:1:12069)
    at o (textBasedLanguages.plugin.js:1:361)
    at async textBasedLanguages.chunk.1.js:1:53347
    at async textBasedLanguages.chunk.1.js:1:53157

@bhavyarm bhavyarm added bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas labels Jun 5, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@kibanamachine kibanamachine added loe:needs-research This issue requires some research before it can be worked on or estimated impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. labels Jun 5, 2024
@bhavyarm
Copy link
Contributor Author

bhavyarm commented Jun 5, 2024

cc @Bamieh

@nreese nreese added Team:ESQL ES|QL related features in Kibana and removed Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas labels Jun 5, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-esql (Team:ESQL)

@nreese
Copy link
Contributor

nreese commented Jun 5, 2024

Changing team from presentation to ESQL since its regarding ESQL documentation string

@bhavyarm
Copy link
Contributor Author

bhavyarm commented Jun 5, 2024

yep shows up in the browser console when I try to add an es|ql panel

@stratoula
Copy link
Contributor

@Bamieh I saw that, can you explain how we can fix it? It is related with your changes but not sure what to do to remove it from the console

@stratoula stratoula added technical debt Improvement of the software architecture and operational architecture Feature:ES|QL ES|QL related features in Kibana and removed bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features labels Jun 6, 2024
@stratoula stratoula changed the title [Serverless-observability-qa] Error parsing translation string error in browser console [ES|QL] Warning in console due to the new translation changes Jun 6, 2024
@Bamieh
Copy link
Member

Bamieh commented Jun 6, 2024

Ok so the message id has malformed formatting:

textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.grok.markdown

basically there is a breaking change caused by the upgrade. escaping character is no longer \ instead it is ' (single quote)

so this line:

| GROK a "%\\{NUMBER:b:int\\} %\\{NUMBER:c:float\\} %\\{NUMBER:d:double\\} %\\{WORD:e:boolean\\}"

needs to become:

| GROK a '"%{NUMBER:b:int} %{NUMBER:c:float} %{NUMBER:d:double} %{WORD:e:boolean}"'

i just escaped the whole text inside the double quotes instead of each individual curly braces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:ES|QL ES|QL related features in Kibana impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:needs-research This issue requires some research before it can be worked on or estimated Team:ESQL ES|QL related features in Kibana technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants