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

[Logs UI] Allow editing of non-resolving log views #210633

Merged
merged 6 commits into from
Feb 14, 2025

Conversation

weltenwort
Copy link
Member

📝 Summary

This changes the settings page of the Logs UI such that it allows editing of log view settings even if the resolution or status check failed. This allows recovery from various situations that were previously only recoverable by resetting the log view completely.

🎨 Previews

log-view-status-remote-cluster-missing

log-view-status-shards-missing

🕵️‍♀️ Review notes

  • To make the deprecated log stream available turn on the "Logs Stream" advanced setting.
  • Target a non-existent remote cluster or non-existent logs indices to trigger the warning. The goal is that the indices setting remains editable regardless.

@weltenwort weltenwort added bug Fixes for quality problems that affect the customer experience Feature:Logs UI Logs UI feature Team:obs-ux-logs Observability Logs User Experience Team labels Feb 11, 2025
@weltenwort weltenwort self-assigned this Feb 11, 2025

// If we didn't remove the item from the cache here the subsequent call to
// create would not have any effect
dataViewsService.clearInstanceCache(dataViewId);
Copy link
Member Author

Choose a reason for hiding this comment

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

I discovered this problem while testing 🤷‍♂️

}
};

const LogsSettingsPageContent = ({
Copy link
Member Author

Choose a reason for hiding this comment

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

Just split the components for better readablility.

@weltenwort weltenwort marked this pull request as ready for review February 11, 2025 20:01
@elasticmachine
Copy link
Contributor

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

@weltenwort weltenwort requested a review from a team February 11, 2025 20:02
@weltenwort weltenwort added release_note:fix backport:skip This commit does not require backporting labels Feb 11, 2025
@gbamparop
Copy link
Contributor

@weltenwort should this be merged into 8.17 and 8.18 too?

@weltenwort
Copy link
Member Author

I think that would make sense

Copy link
Contributor

@tonyghiani tonyghiani left a comment

Choose a reason for hiding this comment

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

Looks good and the UI now reports correctly the errors, thanks for this fix!
I left some minor comments but nothing blocking, maybe let's just wait for a check on the error copies and then is good to go.

Comment on lines +248 to +265
<EuiCallOut title={logIndicesMissingTitle} color="warning" iconType="warning">
{logViewStatus.reason === 'noShardsFound' ? (
<FormattedMessage
id="xpack.infra.sourceConfiguration.logIndicesMissingMessage.noShardsFound"
defaultMessage="No shards found for the specified indices."
/>
) : logViewStatus.reason === 'noIndicesFound' ? (
<FormattedMessage
id="xpack.infra.sourceConfiguration.logIndicesMissingMessage.noIndicesFound"
defaultMessage="No indices found for the specified pattern."
/>
) : logViewStatus.reason === 'remoteClusterNotFound' ? (
<FormattedMessage
id="xpack.infra.sourceConfiguration.logIndicesMissingMessage.remoteClusterNotFound"
defaultMessage="At least one remote cluster was not found."
/>
) : null}
</EuiCallOut>
Copy link
Contributor

Choose a reason for hiding this comment

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

I'll defer to @mdbirnstiehl any suggestion on these copies 😄

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #67 / discover/group1 discover test query should show correct time range string by timepicker

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
logsShared 291 293 +2

Async chunks

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

id before after diff
infra 1.7MB 1.7MB +2.7KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
logsShared 175.8KB 176.8KB +1.0KB
Unknown metric groups

API count

id before after diff
logsShared 321 323 +2

History

cc @weltenwort

@weltenwort weltenwort merged commit 41cd657 into elastic:8.x Feb 14, 2025
9 checks passed
weltenwort added a commit to weltenwort/kibana that referenced this pull request Feb 14, 2025
This changes the settings page of the Logs UI such that it allows editing of log view settings even if the resolution or status check failed. This allows recovery from various situations that were previously only recoverable by resetting the log view completely.

(cherry picked from commit 41cd657)
@weltenwort
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
8.18
8.17

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

Questions ?

Please refer to the Backport tool documentation

weltenwort added a commit to weltenwort/kibana that referenced this pull request Feb 14, 2025
This changes the settings page of the Logs UI such that it allows editing of log view settings even if the resolution or status check failed. This allows recovery from various situations that were previously only recoverable by resetting the log view completely.

(cherry picked from commit 41cd657)

# Conflicts:
#	x-pack/plugins/observability_solution/infra/public/pages/logs/settings/indices_configuration_panel.tsx
weltenwort added a commit that referenced this pull request Feb 15, 2025
…211236)

# Backport

This will backport the following commits from `8.x` to `8.18`:
- [[Logs UI] Allow editing of non-resolving log views
(#210633)](#210633)

<!--- Backport version: 9.6.4 -->

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

<!--BACKPORT [{"author":{"name":"Felix
Stürmer","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-14T14:55:17Z","message":"[Logs
UI] Allow editing of non-resolving log views (#210633)\n\nThis changes
the settings page of the Logs UI such that it allows editing of log view
settings even if the resolution or status check failed. This allows
recovery from various situations that were previously only recoverable
by resetting the log view
completely.","sha":"41cd657811bd1c00ac15860268c018d4d80085ac","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Feature:Logs
UI","backport:skip","Team:obs-ux-logs","v8.18.0","v8.17.3"],"title":"[Logs
UI] Allow editing of non-resolving log
views","number":210633,"url":"https://github.com/elastic/kibana/pull/210633","mergeCommit":{"message":"[Logs
UI] Allow editing of non-resolving log views (#210633)\n\nThis changes
the settings page of the Logs UI such that it allows editing of log view
settings even if the resolution or status check failed. This allows
recovery from various situations that were previously only recoverable
by resetting the log view
completely.","sha":"41cd657811bd1c00ac15860268c018d4d80085ac"}},"sourceBranch":"8.x","suggestedTargetBranches":["8.18","8.17"],"targetPullRequestStates":[{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
weltenwort added a commit that referenced this pull request Feb 15, 2025
…211242)

# Backport

This will backport the following commits from `8.x` to `8.17`:
- [[Logs UI] Allow editing of non-resolving log views
(#210633)](#210633)

<!--- Backport version: 9.6.4 -->

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

<!--BACKPORT [{"author":{"name":"Felix
Stürmer","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-14T14:55:17Z","message":"[Logs
UI] Allow editing of non-resolving log views (#210633)\n\nThis changes
the settings page of the Logs UI such that it allows editing of log view
settings even if the resolution or status check failed. This allows
recovery from various situations that were previously only recoverable
by resetting the log view
completely.","sha":"41cd657811bd1c00ac15860268c018d4d80085ac","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Feature:Logs
UI","backport:skip","Team:obs-ux-logs","v8.18.0","v8.17.3"],"title":"[Logs
UI] Allow editing of non-resolving log
views","number":210633,"url":"https://github.com/elastic/kibana/pull/210633","mergeCommit":{"message":"[Logs
UI] Allow editing of non-resolving log views (#210633)\n\nThis changes
the settings page of the Logs UI such that it allows editing of log view
settings even if the resolution or status check failed. This allows
recovery from various situations that were previously only recoverable
by resetting the log view
completely.","sha":"41cd657811bd1c00ac15860268c018d4d80085ac"}},"sourceBranch":"8.x","suggestedTargetBranches":["8.18","8.17"],"targetPullRequestStates":[{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting bug Fixes for quality problems that affect the customer experience Feature:Logs UI Logs UI feature release_note:fix Team:obs-ux-logs Observability Logs User Experience Team v8.17.3 v8.18.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants