Skip to content

Conversation

@mohamedhamed-ahmed
Copy link
Contributor

@mohamedhamed-ahmed mohamedhamed-ahmed commented Aug 4, 2025

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

…9947)

Fixes elastic#229939

## Summary
The Dataset Quality page was initially introduced with only logs signal
type. Later on we introduced the ability to select more types, ex:
metrics & traces.

Problem is that some places in the code were not updated to accommodate
for this change and were kept under the assumption that the user will
always have access to logs.

This led to a blocked user flow whenever the user has access to for
example metrics but not logs and this PR fixes this.

## 💡 Solution

- **A new initial state machine state `initializing` has been introduced
to lookup all privileges for the known signal types**.
-  **This state triggers either**:

    1.  `emptyState` --> when the user has no authorized signal types
2. `main` --> old normal flow if the user has at least one authorized
type

<img width="1239" height="527" alt="Screenshot 2025-07-30 at 12 20 37"
src="https://github.com/user-attachments/assets/75f96cc4-bbe2-4295-9ff6-6ab85b85e9ba"
/>

---

- **The `Types` drop down is hidden if the user has only 1 authorized
type**

<img width="747" height="111" alt="Screenshot 2025-07-30 at 13 24 22"
src="https://github.com/user-attachments/assets/a6107275-57d7-44f6-ac88-069800c3e58d"
/>

---

- **The header message is updated to reflect the authorized signal
types**

<img width="839" height="126" alt="Screenshot 2025-07-30 at 13 25 00"
src="https://github.com/user-attachments/assets/a56bdb76-6c5e-4bf7-8467-07f77c9b6362"
/>

---

- **The user ends on an empty state page when no authorized types are
available (Warning message udpated to be generic and not only about
logs)**

<img width="1721" height="836" alt="Screenshot 2025-07-30 at 12 21 03"
src="https://github.com/user-attachments/assets/62d3ed5f-3527-4f11-9436-46815f7303e6"
/>

## 🎥 Demo

https://github.com/user-attachments/assets/05db6626-b4d9-4903-b398-a674562dc6de
(cherry picked from commit 96fd2e5)

# Conflicts:
#	x-pack/platform/plugins/private/translations/translations/de-DE.json
#	x-pack/platform/plugins/shared/dataset_quality/public/components/dataset_quality/filters/filters.tsx
#	x-pack/platform/plugins/shared/dataset_quality/public/components/dataset_quality/header.tsx
#	x-pack/platform/plugins/shared/dataset_quality/public/hooks/use_dataset_quality_filters.ts
#	x-pack/platform/plugins/shared/dataset_quality/public/state_machines/dataset_quality_controller/src/state_machine.ts
#	x-pack/solutions/observability/test/functional/page_objects/dataset_quality.ts
#	x-pack/test/dataset_quality_api_integration/tests/data_streams/stats.spec.ts
#	x-pack/test/dataset_quality_api_integration/tests/data_streams/types_privileges.spec.ts
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #3 / InfraOps App Metrics UI Metrics UI Anomaly Flyout anomalies table in flyout with anomalies present should take users to hosts list when 'Show affected Hosts' is clicked

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
datasetQuality 735 734 -1

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
datasetQuality 31 33 +2

Async chunks

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

id before after diff
datasetQuality 440.4KB 442.6KB +2.2KB
Unknown metric groups

API count

id before after diff
datasetQuality 31 33 +2

History

@mohamedhamed-ahmed mohamedhamed-ahmed merged commit bf6cd75 into elastic:8.19 Aug 5, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants