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

[RCA] Fix equation for rule condition chart #193689

Merged

Conversation

benakansara
Copy link
Contributor

@benakansara benakansara commented Sep 23, 2024

Resolves #193688

@benakansara benakansara added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:obs-ux-management Observability Management User Experience Team v8.16.0 backport:version Backport to applied version labels labels Sep 23, 2024
@benakansara benakansara self-assigned this Sep 23, 2024
@benakansara benakansara requested a review from a team as a code owner September 23, 2024 09:55
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Sep 23, 2024
@obltmachine
Copy link

🤖 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!)

@@ -26,7 +26,7 @@ const genLensEqForCustomThresholdRule = (criterion: MetricExpression) => {
(metric: CustomThresholdExpressionMetric) =>
(metricNameResolver[metric.name] = `${
AggMappingForLens[metric.aggType] ? AggMappingForLens[metric.aggType] : metric.aggType
}(${metric.field ? metric.field : metric.filter ? metric.filter : ''})`)
}(${metric.field ? metric.field : metric.filter ? `kql='${metric.filter}'` : ''})`)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you separate out this double ternary into two ternaries? Reading the double ternary is hard.

Suggested change
}(${metric.field ? metric.field : metric.filter ? `kql='${metric.filter}'` : ''})`)
const metricFilter = metric.filter ? `kql='${metric.filter}'` : '';
...
}(${metric.field ? metric.field : metricFilter)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, updated in f7578a8

@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 23, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: f6508c7
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-193689-f6508c703b7e

Failed CI Steps

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
observability 467.3KB 467.3KB +23.0B

History

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

cc @benakansara

Copy link
Contributor

@dominiqueclarke dominiqueclarke left a comment

Choose a reason for hiding this comment

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

LGTM

@benakansara benakansara merged commit 913b6fe into elastic:main Sep 24, 2024
25 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 24, 2024
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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 Sep 24, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[RCA] Fix equation for rule condition chart
(#193689)](#193689)

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

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

<!--BACKPORT [{"author":{"name":"Bena
Kansara","email":"69037875+benakansara@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-24T14:59:35Z","message":"[RCA]
Fix equation for rule condition chart (#193689)\n\nResolves
https://github.com/elastic/kibana/issues/193688","sha":"913b6fed50cbbbc6e05811fa013311e98389e7d0","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","ci:project-deploy-observability","Team:obs-ux-management","v8.16.0","backport:version"],"title":"[RCA]
Fix equation for rule condition
chart","number":193689,"url":"https://github.com/elastic/kibana/pull/193689","mergeCommit":{"message":"[RCA]
Fix equation for rule condition chart (#193689)\n\nResolves
https://github.com/elastic/kibana/issues/193688","sha":"913b6fed50cbbbc6e05811fa013311e98389e7d0"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193689","number":193689,"mergeCommit":{"message":"[RCA]
Fix equation for rule condition chart (#193689)\n\nResolves
https://github.com/elastic/kibana/issues/193688","sha":"913b6fed50cbbbc6e05811fa013311e98389e7d0"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Bena Kansara <69037875+benakansara@users.noreply.github.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 ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-management Observability Management User Experience Team v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RCA] Rule condition chart for count aggregation with KQL filter shows error
6 participants