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] Refactor integrations in DQ Flyout to not depend on main DQ Page page #187450

Conversation

achyutjhunjhunwala
Copy link
Contributor

Summary

This PR is a prerequisite to the Locator Implementation for Logs Explorer - #186287

Problem Statement

  • Integrations were fetched when the main DQ page loads and stored in the State Machine. This means when the Flyout Opens, it was referencing already fetched data from the main page, updating the URL and then that was used to render certain sections on the Flyout. This causes issues as when a Locator is used to directly open the Flyout from some other page. In that case everything happen asynchronously causing the data to be not present when the flyout open thus those integration sections were not present.

Solution

  • Now when the flyout is opened or is already open, it reads the basic params from the URL like DataStream. With this information, it make API call to fetch Integration information and thus making it independent.
    • Does this means you duplicated the Logic to fetch Integrations ? Yes and No. Logic has to be duplicated as Flyout is moving to its own page very soon. This means it would anyhow not be able to re-use that Integration Information available. Secondly the duplication is not one to one, its more catered towards Flyout logic
  • Split the state machine to make Integration Calls only when the opened Dataset is actually an integration. This is done by chaining the respective states after the DataStreamSettings state confirms presence of Integration.

What else has been done

  • Type cleaning: A lot of types has to be refactored to make this change. Also simplified some duplicate types. We were using
    • Runtime types
    • Types Derived from Runtime Types
    • Inferred Types from API Responses
      We don't need the 3rd one. 1 and 2 and sufficient.

@achyutjhunjhunwala achyutjhunjhunwala added release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-logs Observability Logs User Experience Team Feature:Dataset Health labels Jul 3, 2024
@achyutjhunjhunwala achyutjhunjhunwala self-assigned this Jul 3, 2024
@achyutjhunjhunwala achyutjhunjhunwala requested a review from a team as a code owner July 3, 2024 09:15
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Jul 3, 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!)

@achyutjhunjhunwala achyutjhunjhunwala changed the title [Dataset Quality] Refactor integrations to not depend on main page [Dataset Quality] Refactor integrations in DQ Flyout to not depend on main DQ Page page Jul 3, 2024
@yngrdyn yngrdyn self-requested a review July 3, 2024 09:36
Copy link
Contributor

@yngrdyn yngrdyn left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@achyutjhunjhunwala achyutjhunjhunwala enabled auto-merge (squash) July 4, 2024 09:03
@elasticmachine
Copy link
Contributor

elasticmachine commented Jul 4, 2024

💛 Build succeeded, but was flaky

Failed CI Steps

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 280.4KB 282.2KB +1.8KB

Page load bundle

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

id before after diff
datasetQuality 45.6KB 46.0KB +339.0B

History

cc @achyutjhunjhunwala

@achyutjhunjhunwala achyutjhunjhunwala merged commit c483701 into elastic:main Jul 4, 2024
21 of 22 checks passed
@kibanamachine kibanamachine added v8.15.0 backport:skip This commit does not require backporting labels Jul 4, 2024
@achyutjhunjhunwala achyutjhunjhunwala deleted the refactor-integrations-to-not-depend-on-main-page branch July 4, 2024 11:01
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 ci:project-deploy-observability Create an Observability project Feature:Dataset Health release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-logs Observability Logs User Experience Team v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants