Skip to content

[Dataset Quality] Failure store privilege fixes#232003

Merged
mohamedhamed-ahmed merged 13 commits intoelastic:mainfrom
mohamedhamed-ahmed:231836-dataset-quality-details-failure-store-card-privilege
Aug 18, 2025
Merged

[Dataset Quality] Failure store privilege fixes#232003
mohamedhamed-ahmed merged 13 commits intoelastic:mainfrom
mohamedhamed-ahmed:231836-dataset-quality-details-failure-store-card-privilege

Conversation

@mohamedhamed-ahmed
Copy link
Copy Markdown
Contributor

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

closes #231836
closes #231576
closes #231564

@mohamedhamed-ahmed mohamedhamed-ahmed requested a review from a team as a code owner August 16, 2025 14:15
@mohamedhamed-ahmed mohamedhamed-ahmed added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:obs-onboarding Observability Onboarding Team labels Aug 16, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@mohamedhamed-ahmed mohamedhamed-ahmed changed the title [Dataset Quality] Details page failure store card privilege fix [Dataset Quality] Failure store privilege fixes Aug 16, 2025
</EuiFlexItem>
<EuiFlexItem grow={true}>
{!dataStreamSettingsLoading && !hasFailureStore && canUserReadFailureStore ? (
{!dataStreamSettingsLoading && !(hasFailureStore && canUserReadFailureStore) ? (
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fix for #231836

sortable: true,
render: (_: any, dataStreamStat: DataStreamStat) => {
if (!dataStreamStat.hasFailureStore) {
if (
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fix for #231576


const canUserReadFailureStore = Boolean(
dataStreamStats?.some((ds) => ds.userPrivileges.canReadFailureStore)
Object.values(datasetUserPrivileges?.datasetsPrivilages ?? {})?.some(
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fix for #231564

Comment on lines +105 to +115
canUserReadFailureStore && (
<EuiLink
href={locator?.getRedirectUrl(locatorParams)}
target="_blank"
external={false}
>
{i18n.translate('xpack.datasetQuality.enableFailureStore', {
defaultMessage: 'Enable failure store',
})}
</EuiLink>
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This code executes only when !(hasFailureStore && canUserReadFailureStore) is true, but then inside that statement, you're checking if canUserReadFailureStore is true. I think it that part might never execute.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

so the logic is if one of them or both are false we display the card.

then the link is only displayed if the user really has access to failure store and can enable it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You are right, I got confused a bit

Copy link
Copy Markdown
Contributor

@rStelmach rStelmach left a comment

Choose a reason for hiding this comment

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

LGTM

@mohamedhamed-ahmed mohamedhamed-ahmed added backport:version Backport to applied version labels v9.1.0 v8.19.0 and removed backport:skip This PR does not require backporting labels Aug 18, 2025
@mohamedhamed-ahmed mohamedhamed-ahmed enabled auto-merge (squash) August 18, 2025 16:57
@mohamedhamed-ahmed mohamedhamed-ahmed merged commit 371b1ff into elastic:main Aug 18, 2025
19 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.1

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

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

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
datasetQuality 423.6KB 423.8KB +133.0B

@kibanamachine
Copy link
Copy Markdown
Contributor

mohamedhamed-ahmed added a commit to mohamedhamed-ahmed/kibana that referenced this pull request Aug 18, 2025
closes elastic#231836
closes elastic#231576
closes elastic#231564

(cherry picked from commit 371b1ff)

# Conflicts:
#	x-pack/platform/plugins/shared/dataset_quality/public/components/dataset_quality_details/overview/quality_summary_cards/index.tsx
@mohamedhamed-ahmed
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
9.1
8.19

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

Questions ?

Please refer to the Backport tool documentation

mohamedhamed-ahmed added a commit to mohamedhamed-ahmed/kibana that referenced this pull request Aug 18, 2025
closes elastic#231836
closes elastic#231576
closes elastic#231564

(cherry picked from commit 371b1ff)

# Conflicts:
#	x-pack/platform/plugins/shared/dataset_quality/public/components/dataset_quality_details/overview/quality_summary_cards/index.tsx
viduni94 pushed a commit to viduni94/kibana that referenced this pull request Aug 18, 2025
mohamedhamed-ahmed added a commit that referenced this pull request Aug 19, 2025
…2142)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Dataset Quality] Failure store privilege fixes
(#232003)](#232003)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT
[{"author":{"name":"mohamedhamed-ahmed","email":"mohamed.ahmed@elastic.co"},"sourceCommit":{"committedDate":"2025-08-18T16:59:23Z","message":"[Dataset
Quality] Failure store privilege fixes (#232003)\n\ncloses
https://github.com/elastic/kibana/issues/231836\ncloses
https://github.com/elastic/kibana/issues/231576\ncloses
https://github.com/elastic/kibana/issues/231564","sha":"371b1ff1b95a9747b01b27e110dd72f0794b6250","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-logs","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Dataset
Quality] Failure store privilege
fixes","number":232003,"url":"https://github.com/elastic/kibana/pull/232003","mergeCommit":{"message":"[Dataset
Quality] Failure store privilege fixes (#232003)\n\ncloses
https://github.com/elastic/kibana/issues/231836\ncloses
https://github.com/elastic/kibana/issues/231576\ncloses
https://github.com/elastic/kibana/issues/231564","sha":"371b1ff1b95a9747b01b27e110dd72f0794b6250"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/232003","number":232003,"mergeCommit":{"message":"[Dataset
Quality] Failure store privilege fixes (#232003)\n\ncloses
https://github.com/elastic/kibana/issues/231836\ncloses
https://github.com/elastic/kibana/issues/231576\ncloses
https://github.com/elastic/kibana/issues/231564","sha":"371b1ff1b95a9747b01b27e110dd72f0794b6250"}}]}]
BACKPORT-->
mohamedhamed-ahmed added a commit that referenced this pull request Aug 19, 2025
)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Dataset Quality] Failure store privilege fixes
(#232003)](#232003)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT
[{"author":{"name":"mohamedhamed-ahmed","email":"mohamed.ahmed@elastic.co"},"sourceCommit":{"committedDate":"2025-08-18T16:59:23Z","message":"[Dataset
Quality] Failure store privilege fixes (#232003)\n\ncloses
https://github.com/elastic/kibana/issues/231836\ncloses
https://github.com/elastic/kibana/issues/231576\ncloses
https://github.com/elastic/kibana/issues/231564","sha":"371b1ff1b95a9747b01b27e110dd72f0794b6250","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-logs","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Dataset
Quality] Failure store privilege
fixes","number":232003,"url":"https://github.com/elastic/kibana/pull/232003","mergeCommit":{"message":"[Dataset
Quality] Failure store privilege fixes (#232003)\n\ncloses
https://github.com/elastic/kibana/issues/231836\ncloses
https://github.com/elastic/kibana/issues/231576\ncloses
https://github.com/elastic/kibana/issues/231564","sha":"371b1ff1b95a9747b01b27e110dd72f0794b6250"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/232003","number":232003,"mergeCommit":{"message":"[Dataset
Quality] Failure store privilege fixes (#232003)\n\ncloses
https://github.com/elastic/kibana/issues/231836\ncloses
https://github.com/elastic/kibana/issues/231576\ncloses
https://github.com/elastic/kibana/issues/231564","sha":"371b1ff1b95a9747b01b27e110dd72f0794b6250"}}]}]
BACKPORT-->
qn895 pushed a commit to qn895/kibana that referenced this pull request Aug 26, 2025
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 release_note:skip Skip the PR/issue when compiling release notes Team:obs-onboarding Observability Onboarding Team v8.19.0 v8.19.3 v9.1.0 v9.1.3 v9.2.0

Projects

None yet

4 participants