-
Notifications
You must be signed in to change notification settings - Fork 113
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
Add infra support and helper function to create real datasource #1146
Add infra support and helper function to create real datasource #1146
Conversation
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
@BionIT can you review/suggest direction this should go? Any plugins that can use this POC to write some tests for the repo to establish a pattern? |
...ch-dashboards/opensearch-dashboards/datasource-management-plugin/1_create_datasource.spec.js
Outdated
Show resolved
Hide resolved
Does this need backports? |
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
...ch-dashboards/opensearch-dashboards/datasource-management-plugin/1_create_datasource.spec.js
Outdated
Show resolved
Hide resolved
@derek-ho How can we add test data to the added data sources? For ml-commons, we may need to call |
Thanks @derek-ho for this change! Sorry for the late reply! Pulling in @zhongnansu to take a look at the PR as well, since this can save the efforts for other plugins as well cc @seraphjiang |
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
…oards-functional-test into multi-datasources-support
Signed-off-by: Derek Ho <[email protected]>
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.
thanks for the change! left some comments
...ch-dashboards/opensearch-dashboards/datasource-management-plugin/1_create_datasource.spec.js
Outdated
Show resolved
Hide resolved
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Dashboard failures are coming from notification dashboards:
|
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
@CCongWang @tianleh Could you help to review this PR? Thanks in advance! |
@wanglam I modified this PR to download the full distribution. See the helper function I introduced and the README. Once you get the id of the created datasource via the helper function, you should be able to make a regular request with cy.request(ENDPOINT?dataSourceId=${id}), or whichever way the ML plugin implemented request routing for the external datasource, or via UI and cypress actions. |
...ch-dashboards/opensearch-dashboards/datasource-management-plugin/1_create_datasource.spec.js
Outdated
Show resolved
Hide resolved
cypress/utils/dashboards/datasource-management-dashboards-plugin/commands.js
Outdated
Show resolved
Hide resolved
cypress/utils/dashboards/datasource-management-dashboards-plugin/commands.js
Outdated
Show resolved
Hide resolved
...ch-dashboards/opensearch-dashboards/datasource-management-plugin/1_create_datasource.spec.js
Outdated
Show resolved
Hide resolved
We need to call our opensearch plugin directly in our functional tests repo. Could we store the endpoint to the |
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
* Add infra support and helper function to create real datasource Signed-off-by: Derek Ho <[email protected]> * Remove logs from previous change Signed-off-by: Derek Ho <[email protected]> * Add test that uses the helper function to verify functionality Signed-off-by: Derek Ho <[email protected]> * Change to request and add it to appropriate workflows Signed-off-by: Derek Ho <[email protected]> * Add basic auth remote cluster Signed-off-by: Derek Ho <[email protected]> * Call function Signed-off-by: Derek Ho <[email protected]> * Move action Signed-off-by: Derek Ho <[email protected]> * Update action and usage in docs Signed-off-by: Derek Ho <[email protected]> * Checkout before access Signed-off-by: Derek Ho <[email protected]> * Add relative path Signed-off-by: Derek Ho <[email protected]> * Fix spelling Signed-off-by: Derek Ho <[email protected]> * Remove -d Signed-off-by: Derek Ho <[email protected]> * Move port logic Signed-off-by: Derek Ho <[email protected]> * Cat log Signed-off-by: Derek Ho <[email protected]> * Allow modification Signed-off-by: Derek Ho <[email protected]> * Duplicate download Signed-off-by: Derek Ho <[email protected]> * Change directory Signed-off-by: Derek Ho <[email protected]> * Change name Signed-off-by: Derek Ho <[email protected]> * Remove extra chmod Signed-off-by: Derek Ho <[email protected]> * Within test directory Signed-off-by: Derek Ho <[email protected]> * Fix Signed-off-by: Derek Ho <[email protected]> * Fix for windows, add helper function, show usage Signed-off-by: Derek Ho <[email protected]> * Remove pwd Signed-off-by: Derek Ho <[email protected]> * Move to temp dire Signed-off-by: Derek Ho <[email protected]> * Address PR feedback and try to spin up an instance with security Signed-off-by: Derek Ho <[email protected]> * Small action change and documentation add Signed-off-by: Derek Ho <[email protected]> --------- Signed-off-by: Derek Ho <[email protected]> (cherry picked from commit df38e30)
… (#1225) * Add infra support and helper function to create real datasource Signed-off-by: Derek Ho <[email protected]> * Remove logs from previous change Signed-off-by: Derek Ho <[email protected]> * Add test that uses the helper function to verify functionality Signed-off-by: Derek Ho <[email protected]> * Change to request and add it to appropriate workflows Signed-off-by: Derek Ho <[email protected]> * Add basic auth remote cluster Signed-off-by: Derek Ho <[email protected]> * Call function Signed-off-by: Derek Ho <[email protected]> * Move action Signed-off-by: Derek Ho <[email protected]> * Update action and usage in docs Signed-off-by: Derek Ho <[email protected]> * Checkout before access Signed-off-by: Derek Ho <[email protected]> * Add relative path Signed-off-by: Derek Ho <[email protected]> * Fix spelling Signed-off-by: Derek Ho <[email protected]> * Remove -d Signed-off-by: Derek Ho <[email protected]> * Move port logic Signed-off-by: Derek Ho <[email protected]> * Cat log Signed-off-by: Derek Ho <[email protected]> * Allow modification Signed-off-by: Derek Ho <[email protected]> * Duplicate download Signed-off-by: Derek Ho <[email protected]> * Change directory Signed-off-by: Derek Ho <[email protected]> * Change name Signed-off-by: Derek Ho <[email protected]> * Remove extra chmod Signed-off-by: Derek Ho <[email protected]> * Within test directory Signed-off-by: Derek Ho <[email protected]> * Fix Signed-off-by: Derek Ho <[email protected]> * Fix for windows, add helper function, show usage Signed-off-by: Derek Ho <[email protected]> * Remove pwd Signed-off-by: Derek Ho <[email protected]> * Move to temp dire Signed-off-by: Derek Ho <[email protected]> * Address PR feedback and try to spin up an instance with security Signed-off-by: Derek Ho <[email protected]> * Small action change and documentation add Signed-off-by: Derek Ho <[email protected]> --------- Signed-off-by: Derek Ho <[email protected]> (cherry picked from commit df38e30) Co-authored-by: Derek Ho <[email protected]>
…search-project#1146) * Add infra support and helper function to create real datasource Signed-off-by: Derek Ho <[email protected]> * Remove logs from previous change Signed-off-by: Derek Ho <[email protected]> * Add test that uses the helper function to verify functionality Signed-off-by: Derek Ho <[email protected]> * Change to request and add it to appropriate workflows Signed-off-by: Derek Ho <[email protected]> * Add basic auth remote cluster Signed-off-by: Derek Ho <[email protected]> * Call function Signed-off-by: Derek Ho <[email protected]> * Move action Signed-off-by: Derek Ho <[email protected]> * Update action and usage in docs Signed-off-by: Derek Ho <[email protected]> * Checkout before access Signed-off-by: Derek Ho <[email protected]> * Add relative path Signed-off-by: Derek Ho <[email protected]> * Fix spelling Signed-off-by: Derek Ho <[email protected]> * Remove -d Signed-off-by: Derek Ho <[email protected]> * Move port logic Signed-off-by: Derek Ho <[email protected]> * Cat log Signed-off-by: Derek Ho <[email protected]> * Allow modification Signed-off-by: Derek Ho <[email protected]> * Duplicate download Signed-off-by: Derek Ho <[email protected]> * Change directory Signed-off-by: Derek Ho <[email protected]> * Change name Signed-off-by: Derek Ho <[email protected]> * Remove extra chmod Signed-off-by: Derek Ho <[email protected]> * Within test directory Signed-off-by: Derek Ho <[email protected]> * Fix Signed-off-by: Derek Ho <[email protected]> * Fix for windows, add helper function, show usage Signed-off-by: Derek Ho <[email protected]> * Remove pwd Signed-off-by: Derek Ho <[email protected]> * Move to temp dire Signed-off-by: Derek Ho <[email protected]> * Address PR feedback and try to spin up an instance with security Signed-off-by: Derek Ho <[email protected]> * Small action change and documentation add Signed-off-by: Derek Ho <[email protected]> --------- Signed-off-by: Derek Ho <[email protected]>
Description
Currently, there is no common support for creating real datasource connection to other opensearch instances. This adds this support in a helper function that other plugins can call when setting up their own multi datasources tests. In github workflow, it will spin up a cluster with no security running on port 9201 that it can connect to. TODO: add cluster supports for security enabled (basic auth and sigv4 auth). This is currently slightly blocked on opensearch-project/OpenSearch-Dashboards#4524
Issues Resolved
Fix: #1230
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.