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

Make link to es deprecation logs more useful #203487

Merged

Conversation

jesuswr
Copy link
Contributor

@jesuswr jesuswr commented Dec 9, 2024

Summary

resolves #201538

Added a profile to the deprecation logs so by default it shows the columns. Decided to allow this behaviour if the pattern contains multiple patterns for deprecation logs like: .logs-deprecation.abc,.logs-deprecation.def , this can be easily changed if we prefer not to do it this way.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Unit or functional tests were updated or added to match the most common scenarios
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

@jesuswr jesuswr added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Dec 9, 2024
@jesuswr jesuswr self-assigned this Dec 9, 2024
@jesuswr
Copy link
Contributor Author

jesuswr commented Dec 9, 2024

/ci

@jesuswr jesuswr requested a review from a team December 9, 2024 19:37
@TinaHeiligers
Copy link
Contributor

looking great so far!
Screenshot 2024-12-09 at 16 29 40

@TinaHeiligers TinaHeiligers added the release_note:skip Skip the PR/issue when compiling release notes label Dec 9, 2024
@jesuswr jesuswr marked this pull request as ready for review December 10, 2024 09:13
@jesuswr jesuswr requested a review from a team as a code owner December 10, 2024 09:13
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

},
});

const checkAllIndicesInPatternAreDeprecationLogs = (indexPattern: string | undefined): boolean => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@davismcphee Should this behaviour be included in the future helper you mentioned in the slack thread?

@afharo
Copy link
Member

afharo commented Dec 10, 2024

cc @bitzandeb in case you can think of other useful fields to highlight by default.

@jesuswr jesuswr requested a review from afharo December 10, 2024 14:12
Comment on lines +1145 to +1146
# TODO: this deprecation_logs folder should be owned by kibana management team after 9.0
src/plugins/discover/public/context_awareness/profile_providers/common/deprecation_logs @elastic/kibana-data-discovery @elastic/kibana-core
Copy link
Member

Choose a reason for hiding this comment

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

cc @elastic/kibana-management

@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 10, 2024

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #61 / InfraOps App Metrics UI Node Details #Asset Type: host Processes Tab should render processes tab and with Total Value summary
  • [job] [logs] FTR Configs #61 / InfraOps App Metrics UI Node Details #Asset Type: host Processes Tab should render processes tab and with Total Value summary

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
discover 941 944 +3

Async chunks

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

id before after diff
discover 784.9KB 785.6KB +673.0B

History

cc @jesuswr

Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

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

Code changes look good and it works as expected! I left some minor feedback and suggestions, but nothing blocking. Thanks for adding this, it's a great start to improving Discover support for core functionality 👍

One idea for a potential followup would be to adopt some of the functionality from the O11y logs profile to use for deprecation logs too, like log.level cell rendering and row highlighting:
CleanShot 2024-12-10 at 22 56 35@2x

We even have the option to extend the entire O11y logs profile using the extendProfileProvider utility if we think it makes sense to include it all (plus the deprecation specific stuff like custom columns).

},
});

const checkAllIndicesInPatternAreDeprecationLogs = (indexPattern: string | undefined): boolean => {
Copy link
Contributor

@davismcphee davismcphee Dec 11, 2024

Choose a reason for hiding this comment

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

I originally forgot we already had a utility for extracting the index pattern, but I also think it would make sense to extract this if we find it's needed for other profiles in the future.

@jesuswr
Copy link
Contributor Author

jesuswr commented Dec 11, 2024

Thanks for the suggestions @davismcphee ! Just pushed a commit adding them 😄

@jesuswr jesuswr merged commit c423e3e into elastic:main Dec 11, 2024
8 checks passed
@jesuswr jesuswr deleted the make-link-to-es-deprecation-logs-more-useful branch December 11, 2024 12:40
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 11, 2024
## Summary

resolves elastic#201538

Added a profile to the deprecation logs so by default it shows the
columns. Decided to allow this behaviour if the pattern contains
multiple patterns for deprecation logs like:
`.logs-deprecation.abc,.logs-deprecation.def` , this can be easily
changed if we prefer not to do it this way.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit c423e3e)
@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 Dec 11, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [Make link to es deprecation logs more useful
(#203487)](#203487)

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

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

<!--BACKPORT [{"author":{"name":"Jesus
Wahrman","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-11T12:40:27Z","message":"Make
link to es deprecation logs more useful (#203487)\n\n##
Summary\r\n\r\nresolves
https://github.com/elastic/kibana/issues/201538\r\n\r\nAdded a profile
to the deprecation logs so by default it shows the\r\ncolumns. Decided
to allow this behaviour if the pattern contains\r\nmultiple patterns for
deprecation logs like:\r\n`.logs-deprecation.abc,.logs-deprecation.def`
, this can be easily\r\nchanged if we prefer not to do it this
way.\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following
conditions. \r\n\r\nReviewers should verify this PR satisfies this list
as well.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"c423e3e9d3bd61041d4e10e72cef01ea663ca5bf","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","Team:DataDiscovery","backport:prev-minor"],"title":"Make
link to es deprecation logs more
useful","number":203487,"url":"https://github.com/elastic/kibana/pull/203487","mergeCommit":{"message":"Make
link to es deprecation logs more useful (#203487)\n\n##
Summary\r\n\r\nresolves
https://github.com/elastic/kibana/issues/201538\r\n\r\nAdded a profile
to the deprecation logs so by default it shows the\r\ncolumns. Decided
to allow this behaviour if the pattern contains\r\nmultiple patterns for
deprecation logs like:\r\n`.logs-deprecation.abc,.logs-deprecation.def`
, this can be easily\r\nchanged if we prefer not to do it this
way.\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following
conditions. \r\n\r\nReviewers should verify this PR satisfies this list
as well.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"c423e3e9d3bd61041d4e10e72cef01ea663ca5bf"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203487","number":203487,"mergeCommit":{"message":"Make
link to es deprecation logs more useful (#203487)\n\n##
Summary\r\n\r\nresolves
https://github.com/elastic/kibana/issues/201538\r\n\r\nAdded a profile
to the deprecation logs so by default it shows the\r\ncolumns. Decided
to allow this behaviour if the pattern contains\r\nmultiple patterns for
deprecation logs like:\r\n`.logs-deprecation.abc,.logs-deprecation.def`
, this can be easily\r\nchanged if we prefer not to do it this
way.\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following
conditions. \r\n\r\nReviewers should verify this PR satisfies this list
as well.\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"c423e3e9d3bd61041d4e10e72cef01ea663ca5bf"}}]}]
BACKPORT-->

Co-authored-by: Jesus Wahrman <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
## Summary

resolves elastic#201538

Added a profile to the deprecation logs so by default it shows the
columns. Decided to allow this behaviour if the pattern contains
multiple patterns for deprecation logs like:
`.logs-deprecation.abc,.logs-deprecation.def` , this can be easily
changed if we prefer not to do it this way.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UA] Make link to ES deprecation logs in discover more useful
6 participants