-
Notifications
You must be signed in to change notification settings - Fork 163
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
Adds Multiple Datasources Support for Security Dashboards Plugin #1888
Adds Multiple Datasources Support for Security Dashboards Plugin #1888
Conversation
…1818) Signed-off-by: Darshit Chanpura <[email protected]> Signed-off-by: Derek Ho <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]>
) Signed-off-by: Derek Ho <[email protected]>
* Add multi datasource support for internal users tab Signed-off-by: Derek Ho <[email protected]> * Add test coverage for front end and backend Signed-off-by: Derek Ho <[email protected]> * Push cypress test for users Signed-off-by: Derek Ho <[email protected]> * Remove extra click Signed-off-by: Derek Ho <[email protected]> * Consume changes in core Signed-off-by: Derek Ho <[email protected]> * Don't rely on public export for type Signed-off-by: Derek Ho <[email protected]> * Consume list changes, fix cypress test unskips auth test Signed-off-by: Derek Ho <[email protected]> * Fix cypress test Signed-off-by: Derek Ho <[email protected]> * Fix test Signed-off-by: Derek Ho <[email protected]> * Test fix Signed-off-by: Derek Ho <[email protected]> * Add timeout as well Signed-off-by: Derek Ho <[email protected]> * Try different way to select the option Signed-off-by: Derek Ho <[email protected]> * Fix test Signed-off-by: Derek Ho <[email protected]> * Use data test subj for more consistency Signed-off-by: Derek Ho <[email protected]> --------- Signed-off-by: Derek Ho <[email protected]>
--------- Signed-off-by: Derek Ho <[email protected]>
* Adds datasource picker to Permissions tab Signed-off-by: Darshit Chanpura <[email protected]> * Finalizes changes for Permissions tab dataSource picker Signed-off-by: Darshit Chanpura <[email protected]> * Fixes Unit tests Signed-off-by: Darshit Chanpura <[email protected]> * Adds integration tests Signed-off-by: Darshit Chanpura <[email protected]> * Adds cypress test for Permission tab with remote data source Signed-off-by: Darshit Chanpura <[email protected]> * Completes cypress test for Permissions tab, fixes cypress test for Users tab and fixes a spelling error Signed-off-by: Darshit Chanpura <[email protected]> * Updates unit tests and reverts a change in cypress test Signed-off-by: Darshit Chanpura <[email protected]> * Addresses nits to make tests more robust Signed-off-by: Darshit Chanpura <[email protected]> * Fixes unit tests Signed-off-by: Darshit Chanpura <[email protected]> --------- Signed-off-by: Darshit Chanpura <[email protected]>
* Add multi datasource support for the tenanct and audit log tabs Signed-off-by: Derek Ho <[email protected]> * Add integraiton tests for audit log with and without multi datasource Signed-off-by: Derek Ho <[email protected]> * Add cypress test support for tenancy and audit log Signed-off-by: Derek Ho <[email protected]> * Add toast support and assert existance of page element to make test unflaky Signed-off-by: Derek Ho <[email protected]> --------- Signed-off-by: Derek Ho <[email protected]>
* Adds datasource picker for Roles tab and its sub-tabs Signed-off-by: Darshit Chanpura <[email protected]> * Fixes jest:ui task Signed-off-by: Darshit Chanpura <[email protected]> * Adds integration test for roles datasource picker Signed-off-by: Darshit Chanpura <[email protected]> * Adds cypress test for roles tab Signed-off-by: Darshit Chanpura <[email protected]> * fixFix ResizeObserver loop error Signed-off-by: Darshit Chanpura <[email protected]> * Makes query param required Signed-off-by: Darshit Chanpura <[email protected]> --------- Signed-off-by: Darshit Chanpura <[email protected]>
* Add selector on service accounts page Signed-off-by: Derek Ho <[email protected]> * Lint Signed-off-by: Derek Ho <[email protected]> * Fix test for service accounts Signed-off-by: Derek Ho <[email protected]> --------- Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
* Add cluster info to toasts Signed-off-by: Derek Ho <[email protected]> * Add URL support Signed-off-by: Derek Ho <[email protected]> * Initial work to read/write from url Signed-off-by: Derek Ho <[email protected]> * Consume changes from core Signed-off-by: Derek Ho <[email protected]> * Lint and remove unused imports Signed-off-by: Derek Ho <[email protected]> * Fix edge case and test Signed-off-by: Derek Ho <[email protected]> * Refactors tests to accomodate changes to dataSource value consumption from URL Signed-off-by: Darshit Chanpura <[email protected]> * Try in headless mode Signed-off-by: Derek Ho <[email protected]> * Make closeToast better and revert to admin password for matrix going back to 2.4 Signed-off-by: Derek Ho <[email protected]> * Try experimental memory management Signed-off-by: Derek Ho <[email protected]> * Try to fix closeToast Signed-off-by: Derek Ho <[email protected]> * Fix for close toast Signed-off-by: Derek Ho <[email protected]> * Find by warning Signed-off-by: Derek Ho <[email protected]> * Fix by warning Signed-off-by: Derek Ho <[email protected]> * Fix tenancy test from main Signed-off-by: Derek Ho <[email protected]> * Fix auth test and be explicit about local datasource Signed-off-by: Derek Ho <[email protected]> * Test fixes Signed-off-by: Derek Ho <[email protected]> * Fix role flaky test Signed-off-by: Derek Ho <[email protected]> * Nit Signed-off-by: Derek Ho <[email protected]> * Makes github cypress run headless Signed-off-by: Darshit Chanpura <[email protected]> * Enabled experimentalMemoryManagement for chromium based cypress tests Signed-off-by: Darshit Chanpura <[email protected]> --------- Signed-off-by: Derek Ho <[email protected]> Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]>
…rds-plugin into HEAD Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
@derek-ho Can you please fill out the description of this PR? What is remaining before it is flipped from Draft? |
@cwperks working on cypress test stability - see draft PR: #1894. Cypress tests consistently working on @DarshitChanpura and I's local, but failing on github runner due to space issues, we are seeing if we can find the root case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some initial comments.
Would it be possible to capture a recording of the cypress tests that are run that test the MDS functionality?
public/apps/configuration/panels/audit-logging/audit-logging-edit-settings.tsx
Outdated
Show resolved
Hide resolved
* Fix some state issues and try to use electron browser Signed-off-by: Derek Ho <[email protected]> * Try modifying numtestskeptinmemory Signed-off-by: Derek Ho <[email protected]> * Remove closetoast Signed-off-by: Derek Ho <[email protected]> * Fix flaky cypress test Signed-off-by: Derek Ho <[email protected]> * Run 10x Signed-off-by: Derek Ho <[email protected]> * Fix test Signed-off-by: Derek Ho <[email protected]> * Fix permissions test Signed-off-by: Derek Ho <[email protected]> * Move management to correct section Signed-off-by: Derek Ho <[email protected]> * Push up fixes for audit logs and roles Signed-off-by: Derek Ho <[email protected]> * Remove local cluster checks to cut length and increase stability Signed-off-by: Derek Ho <[email protected]> * Improves before and after handling Signed-off-by: Darshit Chanpura <[email protected]> * Temporarily disable permissions and roles tests Signed-off-by: Darshit Chanpura <[email protected]> * adds delete datasource call to beforeEach Signed-off-by: Darshit Chanpura <[email protected]> * Unskip permissions test Signed-off-by: Darshit Chanpura <[email protected]> * Absorb changes from core Signed-off-by: Darshit Chanpura <[email protected]> * Fixes tests Signed-off-by: Darshit Chanpura <[email protected]> * Skips legacy browser warning Signed-off-by: Darshit Chanpura <[email protected]> * Refactor audit logs tests Signed-off-by: Darshit Chanpura <[email protected]> * Force page reload post creation Signed-off-by: Darshit Chanpura <[email protected]> * Unskip auth and roles, and skip audit logs Signed-off-by: Darshit Chanpura <[email protected]> * Skip roles tab Signed-off-by: Darshit Chanpura <[email protected]> * Changes data source url Signed-off-by: Darshit Chanpura <[email protected]> * Fix lint issues Signed-off-by: Darshit Chanpura <[email protected]> * Chrome Signed-off-by: Derek Ho <[email protected]> * Skip users and permissions tab Signed-off-by: Derek Ho <[email protected]> * Revert cypress settings Signed-off-by: Derek Ho <[email protected]> * Modify test to make cypress request instead of UI Signed-off-by: Derek Ho <[email protected]> * Lint Signed-off-by: Derek Ho <[email protected]> * Add fix for get started and rewrite users test Signed-off-by: Derek Ho <[email protected]> * use tostring to be more consistent with the actual behavior Signed-off-by: Derek Ho <[email protected]> * Try to fix flaky tests Signed-off-by: Derek Ho <[email protected]> * Revert to beforeeach and aftereach Signed-off-by: Derek Ho <[email protected]> * Fix test Signed-off-by: Derek Ho <[email protected]> * Fix lint Signed-off-by: Derek Ho <[email protected]> * Fix roles and enable Signed-off-by: Derek Ho <[email protected]> * Adds retry mechanism to cypress tests Signed-off-by: Darshit Chanpura <[email protected]> * Increases retries to 5 Signed-off-by: Darshit Chanpura <[email protected]> * Reverts CI runs to 1 Signed-off-by: Darshit Chanpura <[email protected]> --------- Signed-off-by: Derek Ho <[email protected]> Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Derek Ho <[email protected]>
.github/workflows/cypress-test-multidatasources-enabled-e2e.yml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a second pass. This looks very close. Thanks for fixing the issues with the tests!
public/apps/configuration/panels/audit-logging/audit-logging-edit-settings.tsx
Outdated
Show resolved
Hide resolved
public/apps/configuration/panels/audit-logging/audit-logging-edit-settings.tsx
Show resolved
Hide resolved
public/apps/configuration/panels/audit-logging/audit-logging-edit-settings.tsx
Show resolved
Hide resolved
public/apps/configuration/panels/internal-user-edit/internal-user-edit.tsx
Show resolved
Hide resolved
Cypress test failures resolved by: opensearch-project/opensearch-dashboards-functional-test#1239 |
@derek-ho Is this blocked until opensearch-project/opensearch-dashboards-functional-test#1239 is merged? |
Signed-off-by: Derek Ho <[email protected]>
It was merged, and I also updated some of the datasource specific tests to incorporate upstream core changes, CI is green now, and ready for re-review 👍 |
Signed-off-by: Derek Ho <[email protected]>
9d60f4f
Signed-off-by: Derek Ho <[email protected]>
ec0d269
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-1888-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 154a3ba08828b36a8dae684651f25c8d72f584be
# Push it to GitHub
git push --set-upstream origin backport/backport-1888-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x Then, create a pull request where the |
…nsearch-project#1888) Signed-off-by: Darshit Chanpura <[email protected]> Signed-off-by: Derek Ho <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]> (cherry picked from commit 154a3ba) Signed-off-by: Derek Ho <[email protected]>
…rds Plugin (#1888) (#1911) Signed-off-by: Darshit Chanpura <[email protected]> Signed-off-by: Derek Ho <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]> Co-authored-by: Darshit Chanpura <[email protected]>
Description
This PR merges the feature branch feature/supporting-multiple-datasources to main. It adds support for multiple datasources within the security dashboards plugin. This means that for each page (minus tenancy and service accounts which are both locked to the local cluster), users can choose between different clusters that they added as a datasource and perform CRUD operations on that cluster's security backend plugin. If multi datasources is not enabled, then the security dashboards plugin will behave in the same way as before.
Category
New feature
Why these changes are required?
To support multiple datasources in the security dashboards plugin.
What is the old behavior before changes and new behavior after changes?
Old behavior: no support for multiple datasources (all CRUD operations done on local cluster)
New behavior: support for multiple datasources (users can choose which cluster to do CRUD operations on)
Video of security plugin with these changes, with/without multi datasources feature enabled:
Screen.Recording.2024-04-22.at.5.03.07.PM.mov
Issues Resolved
Close: #1794
Testing
Adds unit tests where appropriate, adds cypress tests (currently flaky), adds integration tests against a matrix of prior versions of OpenSearch to ensure compatibility with linux and windows.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.