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

Dashboard Lists Integration #3090

Conversation

pjfitzgibbons
Copy link
Contributor

@pjfitzgibbons pjfitzgibbons commented Dec 15, 2022

Description

  • Configure types for registration of Dashboard List "Providers"

These changes enable the interactions demonstrated in this animation:

Audio starts at 0:05. Unmute to listen.

Dashboard-integration-demo2.mov

References : observability#1308

Issues WIP

[FEATURE] Dashboards List Extensibility & Integrate Observability Apps/Panels/EventAnalytics

  • includes alternate solutions, example animation, and further explanation of this solution.

Testing Failures vs UX/CX of Linking "integrated" Plugins

Using EUILink w/ href=

Pros :

  • Works in test suite w/o change.

Cons :

  • Causes browser-reload in production due to operation of React Router / SPA and navigating "between" SPA's

Using EUILink w/ onClick=(() => navigateToApp(app, path) )

Pros :

  • Runs on browser production without reload when navigating "between" SPA's

Cons :

  • Test suite fails on Dashboard-Clone test, when trying to click on Dashboard-List for any existing Dashboard item.
  • http://.../app/dashboard?_t=123456#/list?_g=...

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
    • yarn test:ftr
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@pjfitzgibbons pjfitzgibbons requested a review from a team as a code owner December 15, 2022 20:50
@pjfitzgibbons pjfitzgibbons force-pushed the feature/dashboard-list-integration.7 branch from dfe9fe1 to ad46ccb Compare December 15, 2022 21:06
@ashwin-pc
Copy link
Member

@pjfitzgibbons is this the same as #3000?

@pjfitzgibbons
Copy link
Contributor Author

pjfitzgibbons commented Dec 16, 2022 via email

Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

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

I didnt get too far into the review but I just pulled down the PR and ran it when i came across a few issues.

Screen Shot 2022-12-16 at 5 40 24 PM

  1. On clicking that button I get the following error.

Screen Shot 2022-12-16 at 5 41 05 PM

config/opensearch_dashboards.yml Outdated Show resolved Hide resolved
src/plugins/dashboard/common/types.ts Outdated Show resolved Hide resolved
src/plugins/dashboard/public/application/legacy_app.ts Outdated Show resolved Hide resolved
src/plugins/dashboard/public/plugin.tsx Outdated Show resolved Hide resolved
@seanneumann
Copy link
Contributor

How are we doing on this PR?

@pjfitzgibbons
Copy link
Contributor Author

@seanneumann Ready for continuing review. Previous quesitons addressed.

@seanneumann
Copy link
Contributor

@pjfitzgibbons cool. Can you also have someone in your group review it too? Would love to see their feedback, too if possible.

@ashwin-pc
Copy link
Member

@pjfitzgibbons I'm still not able to make this feature work when i clone it locally and run it. I still see the same error that I called out in my last review. Do you have a different OSD setup? do you have any plugins installed?

@pjfitzgibbons
Copy link
Contributor Author

@ashwin-pc Error on default Dashboard-create fixed now.

@anirudha
Copy link

anirudha commented Jan 6, 2023

@pjfitzgibbons can we also have josh/ eric review this

@joshuarrrr joshuarrrr added v2.5.0 'Issues and PRs related to version v2.5.0' backport 2.x labels Jan 6, 2023
@AMoo-Miki
Copy link
Collaborator

Test snapshots need to be updated and it would be great if the PR was rebased.

@pjfitzgibbons
Copy link
Contributor Author

@AMoo-Miki Working on test updates now...

@pjfitzgibbons
Copy link
Contributor Author

Test snapshots need to be updated and it would be great if the PR was rebased.

Updating tests momentarily...

@pjfitzgibbons
Copy link
Contributor Author

Cypress tests are failing from upstream :
dashboard sample data validation -- adding sample data -- checking Visualize
All other cypress tests pass.

@codecov-commenter
Copy link

codecov-commenter commented Jan 6, 2023

Codecov Report

Merging #3090 (5e23be7) into main (53047b6) will decrease coverage by 0.01%.
The diff coverage is 52.27%.

❗ Current head 5e23be7 differs from pull request most recent head 1bc9c2c. Consider uploading reports for the commit 1bc9c2c to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #3090      +/-   ##
==========================================
- Coverage   66.45%   66.44%   -0.01%     
==========================================
  Files        3209     3210       +1     
  Lines       61633    61670      +37     
  Branches     9506     9514       +8     
==========================================
+ Hits        40960    40979      +19     
- Misses      18396    18412      +16     
- Partials     2277     2279       +2     
Flag Coverage Δ
Linux 66.39% <52.27%> (-0.01%) ⬇️
Windows 66.39% <52.27%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/plugins/dashboard/public/plugin.tsx 0.00% <0.00%> (ø)
...s_react/public/table_list_view/table_list_view.tsx 0.00% <0.00%> (ø)
...board/public/application/listing/create_button.tsx 91.66% <91.66%> (ø)
...rd/public/application/listing/dashboard_listing.js 76.92% <100.00%> (-1.65%) ⬇️

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@pjfitzgibbons pjfitzgibbons requested review from ashwin-pc and joshuali925 and removed request for ashwin-pc and joshuali925 January 9, 2023 23:34
Copy link
Member

@joshuarrrr joshuarrrr left a comment

Choose a reason for hiding this comment

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

@pjfitzgibbons I haven't finished reviewing this yet, but I wanted to flag that I don't think we should have any dashboard-app-specific props in the generic react components like table_list_view. It also seems like we have a number of duplicated types that would be useful to consolidate.

CHANGELOG.md Outdated Show resolved Hide resolved
src/plugins/dashboard/common/types.ts Outdated Show resolved Hide resolved
Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

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

I was able to successfully pull the code and verify that it works. I did not verify the behavior with additional dashboard creators though. Is there an easy way for me to verify that it works without installing the observability plugin?

@pjfitzgibbons
Copy link
Contributor Author

Sigh. TWO character commit.

@pjfitzgibbons
Copy link
Contributor Author

Meeting notes from call 3/27/2023 3:30 PM
Attendees : @seanneumann @anirudha @kavilla @pjfitzgibbons @kgcreative

Discussed EUILink pros/cons as described in Description of this PR.

Final decision, supported by A. Jadhav, S.Neumann and K. Avilla, K. Garcia :

Change will be restored to use <EUILink href=...> which passes all tests locally (P.Fitzgibbons) from ciGroup5, ciGroup7, ciGroup9.
The meeting group acknowledged that browser navigation "between" plugins, including OSD's own plugins, cause a server-side request. This is due to the way React Router/HashRouter behave with SSR.
The browser-reload when navigating between plugins will be addressed in a subsequent PR to OSD, where the concern will be addressed at the platform level.

Final commits to this PR will be posted today and CI run is expected to be all-green. PR will then be ready for merge with support from K.Avilla and evidence of all previous reviews.

@@ -196,7 +196,7 @@ export async function BrowserProvider({ getService }: FtrProviderContext) {
* @param {boolean} insertTimestamp Optional
* @return {Promise<void>}
*/
public async get(url: string, insertTimestamp: boolean = true) {
public async get(url: string, insertTimestamp: boolean = false) {
Copy link
Member

Choose a reason for hiding this comment

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

the test is failing due to this change. could we revert this back to true?

Peter Fitzgibbons added 3 commits March 29, 2023 04:06
* Plugins register their links with registerDashboardProvider API

Signed-off-by: Peter Fitzgibbons <pjfitz@amazon.com>
Signed-off-by: Peter Fitzgibbons <pjfitz@amazon.com>
Signed-off-by: Peter Fitzgibbons <pjfitz@amazon.com>
@pjfitzgibbons pjfitzgibbons force-pushed the feature/dashboard-list-integration.7 branch from 926d481 to 5e23be7 Compare March 29, 2023 11:06
Signed-off-by: Peter Fitzgibbons <pjfitz@amazon.com>
@pjfitzgibbons
Copy link
Contributor Author

Cypress passes locally :

  34 passing (1m)


  (Results)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Tests:        34                                                                               │
  │ Passing:      34                                                                               │
  │ Failing:      0                                                                                │
  │ Pending:      0                                                                                │
  │ Skipped:      0                                                                                │
  │ Screenshots:  0                                                                                │
  │ Video:        true                                                                             │
  │ Duration:     1 minute, 18 seconds                                                             │
  │ Spec Ran:     core-opensearch-dashboards/opensearch-dashboards/dashboard_sanity_test_spec.js   │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘


  (Video)

  -  Started processing:  Compressing to 32 CRF                                                     
  -  Finished processing: /Users/pjfitz/IdeaProjects/OpenSearch/opensearch-dashboards    (8 seconds)
                          -functional-test/cypress/videos/core-opensearch-dashboards/               
                          opensearch-dashboards/dashboard_sanity_test_spec.js.mp4                   

ARM appears to be a platform issue :

   │ debg Attempting download of https://mirrors.nodejs.org/dist/v14.21.3/node-v14.21.3-linux-arm64.tar.gz 044b7ec3fea04cd3815d26901ee37203dcc942688b72ee6eac96f6a1ca3cc63f
   │ debg Download failed: Request failed with status code 500

@joshuarrrr
Copy link
Member

cypress test failures can be ignored - they're related to vis builder changes

@joshuarrrr joshuarrrr linked an issue Mar 30, 2023 that may be closed by this pull request
kavilla
kavilla previously approved these changes Mar 30, 2023
joshuarrrr
joshuarrrr previously approved these changes Mar 30, 2023
Copy link
Member

@joshuarrrr joshuarrrr left a comment

Choose a reason for hiding this comment

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

Thanks!

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

nice, thanks for providing!

Signed-off-by: Josh Romero <rmerqg@amazon.com>
@joshuarrrr joshuarrrr dismissed stale reviews from kavilla and themself via d719339 March 30, 2023 23:08
@joshuarrrr joshuarrrr merged commit d2bd318 into opensearch-project:main Mar 30, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 30, 2023
* Dashboard-List Integration
* Plugins register their links with registerDashboardProvider API

Signed-off-by: Peter Fitzgibbons <pjfitz@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Josh Romero <rmerqg@amazon.com>

---------

Signed-off-by: Peter Fitzgibbons <pjfitz@amazon.com>
Signed-off-by: Josh Romero <rmerqg@amazon.com>
Co-authored-by: Peter Fitzgibbons <pjfitz@amazon.com>
Co-authored-by: Josh Romero <rmerqg@amazon.com>
(cherry picked from commit d2bd318)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
vagimeli pushed a commit to vagimeli/OpenSearch-Dashboards that referenced this pull request Apr 4, 2023
* Dashboard-List Integration
* Plugins register their links with registerDashboardProvider API

Signed-off-by: Peter Fitzgibbons <pjfitz@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Josh Romero <rmerqg@amazon.com>

---------

Signed-off-by: Peter Fitzgibbons <pjfitz@amazon.com>
Signed-off-by: Josh Romero <rmerqg@amazon.com>
Co-authored-by: Peter Fitzgibbons <pjfitz@amazon.com>
Co-authored-by: Josh Romero <rmerqg@amazon.com>
Signed-off-by: vagimeli <vagimeli@amazon.com>
kristenTian pushed a commit that referenced this pull request Apr 4, 2023
* Dashboard-List Integration
* Plugins register their links with registerDashboardProvider API

Signed-off-by: Peter Fitzgibbons <pjfitz@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Josh Romero <rmerqg@amazon.com>

---------

Signed-off-by: Peter Fitzgibbons <pjfitz@amazon.com>
Signed-off-by: Josh Romero <rmerqg@amazon.com>
Co-authored-by: Peter Fitzgibbons <pjfitz@amazon.com>
Co-authored-by: Josh Romero <rmerqg@amazon.com>
(cherry picked from commit d2bd318)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
sikhote pushed a commit to sikhote/OpenSearch-Dashboards that referenced this pull request Apr 24, 2023
* Dashboard-List Integration
* Plugins register their links with registerDashboardProvider API

Signed-off-by: Peter Fitzgibbons <pjfitz@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Josh Romero <rmerqg@amazon.com>

---------

Signed-off-by: Peter Fitzgibbons <pjfitz@amazon.com>
Signed-off-by: Josh Romero <rmerqg@amazon.com>
Co-authored-by: Peter Fitzgibbons <pjfitz@amazon.com>
Co-authored-by: Josh Romero <rmerqg@amazon.com>
Signed-off-by: David Sinclair <david@sinclair.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Dashboards List Extensions