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

[Dataset quality] remove usage of dataStreamStats API in serverless #192839

Conversation

yngrdyn
Copy link
Contributor

@yngrdyn yngrdyn commented Sep 13, 2024

Closes #192166.

This PR aims to remove the usage of DataStreamStats API in serverless. Aditionally we now make use of the new verbose mode for DataStream API which allow us to still show the lastActivity for serverless projects. The change was implemented for both flavours.

Visually it won't represent any changes at the moment, but here are the two flavours still working as before

Screen.Recording.2024-09-13.at.12.38.00.mov

@yngrdyn yngrdyn requested a review from a team as a code owner September 13, 2024 10:30
@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Sep 13, 2024
@yngrdyn yngrdyn added the release_note:skip Skip the PR/issue when compiling release notes label Sep 13, 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!)

@yngrdyn yngrdyn added the backport:prev-minor Backport to the previous minor version (i.e. one version back from main) label Sep 13, 2024
@yngrdyn
Copy link
Contributor Author

yngrdyn commented Sep 17, 2024

We discovered a bug in the privileges mode regarding verbose mode for dataStreams API. The fix is coming in elastic/elasticsearch#112973

const handleButtonClick = useCallback(
() => togglePopover(!isPopoverOpen),
[isPopoverOpen, togglePopover]
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Caught a bug where user was not able to close the warning explanation on the privileges

Screen.Recording.2024-09-18.at.12.20.34.mov

@@ -26,7 +25,7 @@ export function DatasetsActivity() {
tooltip={summaryPanelDatasetsActivityTooltipText}
value={text}
isLoading={isDatasetsActivityLoading}
isUserAuthorizedForDataset={isUserAuthorizedForDataset}
isUserAuthorizedForDataset={true}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Last Activity is now always enabled through dataStreams API verbose mode

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we completely remove this prop in favour of this change now ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This generic component is used also for Estimated Size. In https://github.com/elastic/logs-dev/issues/179 I'll do a refactor

@@ -59,13 +61,15 @@ export async function getDataStreams(options: {
const mappedDataStreams = filteredDataStreams.map((dataStream) => ({
name: dataStream.name,
integration: dataStream._meta?.package?.name,
// @ts-expect-error
lastActivity: dataStream.maximum_timestamp,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

package of elasticsearch has not been released yet, this will be removed when the new package is in place

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you update the comment like, remove this error post a date or PR merge. This way its trackable in code as this comment will get lost in time

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't worry, I won't forget. As soon as 8.16 is released I'll get rid of it

@tonyghiani tonyghiani self-requested a review September 19, 2024 08:18
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.

Left a couple of minor suggestions but overall LGTM!

Copy link
Contributor

@achyutjhunjhunwala achyutjhunjhunwala left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏼

@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 19, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: 3e37cba
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-192839-3e37cbad346f

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #14 / Configuration button renders the tooltip correctly when hovering the button

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 208.7KB 208.5KB -237.0B

History

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

@yngrdyn yngrdyn merged commit 444f95e into elastic:main Sep 19, 2024
23 of 24 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 19, 2024
…lastic#192839)

Closes elastic#192166.

This PR aims to remove the usage of `DataStreamStats` API in serverless.
Aditionally we now make use of the new verbose mode for `DataStream` API
which allow us to still show the `lastActivity` for serverless projects.
The change was implemented for both flavours.

Visually it won't represent any changes at the moment, but here are the
two flavours still working as before

https://github.com/user-attachments/assets/18cc9b14-24f1-438a-ac07-565c3e728991
(cherry picked from commit 444f95e)
@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to the previous minor version (i.e. one version back from main) ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dataset quality] Remove DataStreams stats API usage on serverless
6 participants