-
Notifications
You must be signed in to change notification settings - Fork 114
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 <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
@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 <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
...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 <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
…oards-functional-test into multi-datasources-support
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 <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Dashboard failures are coming from notification dashboards:
|
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
@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 <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
* Add infra support and helper function to create real datasource Signed-off-by: Derek Ho <dxho@amazon.com> * Remove logs from previous change Signed-off-by: Derek Ho <dxho@amazon.com> * Add test that uses the helper function to verify functionality Signed-off-by: Derek Ho <dxho@amazon.com> * Change to request and add it to appropriate workflows Signed-off-by: Derek Ho <dxho@amazon.com> * Add basic auth remote cluster Signed-off-by: Derek Ho <dxho@amazon.com> * Call function Signed-off-by: Derek Ho <dxho@amazon.com> * Move action Signed-off-by: Derek Ho <dxho@amazon.com> * Update action and usage in docs Signed-off-by: Derek Ho <dxho@amazon.com> * Checkout before access Signed-off-by: Derek Ho <dxho@amazon.com> * Add relative path Signed-off-by: Derek Ho <dxho@amazon.com> * Fix spelling Signed-off-by: Derek Ho <dxho@amazon.com> * Remove -d Signed-off-by: Derek Ho <dxho@amazon.com> * Move port logic Signed-off-by: Derek Ho <dxho@amazon.com> * Cat log Signed-off-by: Derek Ho <dxho@amazon.com> * Allow modification Signed-off-by: Derek Ho <dxho@amazon.com> * Duplicate download Signed-off-by: Derek Ho <dxho@amazon.com> * Change directory Signed-off-by: Derek Ho <dxho@amazon.com> * Change name Signed-off-by: Derek Ho <dxho@amazon.com> * Remove extra chmod Signed-off-by: Derek Ho <dxho@amazon.com> * Within test directory Signed-off-by: Derek Ho <dxho@amazon.com> * Fix Signed-off-by: Derek Ho <dxho@amazon.com> * Fix for windows, add helper function, show usage Signed-off-by: Derek Ho <dxho@amazon.com> * Remove pwd Signed-off-by: Derek Ho <dxho@amazon.com> * Move to temp dire Signed-off-by: Derek Ho <dxho@amazon.com> * Address PR feedback and try to spin up an instance with security Signed-off-by: Derek Ho <dxho@amazon.com> * Small action change and documentation add Signed-off-by: Derek Ho <dxho@amazon.com> --------- Signed-off-by: Derek Ho <dxho@amazon.com> (cherry picked from commit df38e30)
… (#1225) * Add infra support and helper function to create real datasource Signed-off-by: Derek Ho <dxho@amazon.com> * Remove logs from previous change Signed-off-by: Derek Ho <dxho@amazon.com> * Add test that uses the helper function to verify functionality Signed-off-by: Derek Ho <dxho@amazon.com> * Change to request and add it to appropriate workflows Signed-off-by: Derek Ho <dxho@amazon.com> * Add basic auth remote cluster Signed-off-by: Derek Ho <dxho@amazon.com> * Call function Signed-off-by: Derek Ho <dxho@amazon.com> * Move action Signed-off-by: Derek Ho <dxho@amazon.com> * Update action and usage in docs Signed-off-by: Derek Ho <dxho@amazon.com> * Checkout before access Signed-off-by: Derek Ho <dxho@amazon.com> * Add relative path Signed-off-by: Derek Ho <dxho@amazon.com> * Fix spelling Signed-off-by: Derek Ho <dxho@amazon.com> * Remove -d Signed-off-by: Derek Ho <dxho@amazon.com> * Move port logic Signed-off-by: Derek Ho <dxho@amazon.com> * Cat log Signed-off-by: Derek Ho <dxho@amazon.com> * Allow modification Signed-off-by: Derek Ho <dxho@amazon.com> * Duplicate download Signed-off-by: Derek Ho <dxho@amazon.com> * Change directory Signed-off-by: Derek Ho <dxho@amazon.com> * Change name Signed-off-by: Derek Ho <dxho@amazon.com> * Remove extra chmod Signed-off-by: Derek Ho <dxho@amazon.com> * Within test directory Signed-off-by: Derek Ho <dxho@amazon.com> * Fix Signed-off-by: Derek Ho <dxho@amazon.com> * Fix for windows, add helper function, show usage Signed-off-by: Derek Ho <dxho@amazon.com> * Remove pwd Signed-off-by: Derek Ho <dxho@amazon.com> * Move to temp dire Signed-off-by: Derek Ho <dxho@amazon.com> * Address PR feedback and try to spin up an instance with security Signed-off-by: Derek Ho <dxho@amazon.com> * Small action change and documentation add Signed-off-by: Derek Ho <dxho@amazon.com> --------- Signed-off-by: Derek Ho <dxho@amazon.com> (cherry picked from commit df38e30) Co-authored-by: Derek Ho <dxho@amazon.com>
…search-project#1146) * Add infra support and helper function to create real datasource Signed-off-by: Derek Ho <dxho@amazon.com> * Remove logs from previous change Signed-off-by: Derek Ho <dxho@amazon.com> * Add test that uses the helper function to verify functionality Signed-off-by: Derek Ho <dxho@amazon.com> * Change to request and add it to appropriate workflows Signed-off-by: Derek Ho <dxho@amazon.com> * Add basic auth remote cluster Signed-off-by: Derek Ho <dxho@amazon.com> * Call function Signed-off-by: Derek Ho <dxho@amazon.com> * Move action Signed-off-by: Derek Ho <dxho@amazon.com> * Update action and usage in docs Signed-off-by: Derek Ho <dxho@amazon.com> * Checkout before access Signed-off-by: Derek Ho <dxho@amazon.com> * Add relative path Signed-off-by: Derek Ho <dxho@amazon.com> * Fix spelling Signed-off-by: Derek Ho <dxho@amazon.com> * Remove -d Signed-off-by: Derek Ho <dxho@amazon.com> * Move port logic Signed-off-by: Derek Ho <dxho@amazon.com> * Cat log Signed-off-by: Derek Ho <dxho@amazon.com> * Allow modification Signed-off-by: Derek Ho <dxho@amazon.com> * Duplicate download Signed-off-by: Derek Ho <dxho@amazon.com> * Change directory Signed-off-by: Derek Ho <dxho@amazon.com> * Change name Signed-off-by: Derek Ho <dxho@amazon.com> * Remove extra chmod Signed-off-by: Derek Ho <dxho@amazon.com> * Within test directory Signed-off-by: Derek Ho <dxho@amazon.com> * Fix Signed-off-by: Derek Ho <dxho@amazon.com> * Fix for windows, add helper function, show usage Signed-off-by: Derek Ho <dxho@amazon.com> * Remove pwd Signed-off-by: Derek Ho <dxho@amazon.com> * Move to temp dire Signed-off-by: Derek Ho <dxho@amazon.com> * Address PR feedback and try to spin up an instance with security Signed-off-by: Derek Ho <dxho@amazon.com> * Small action change and documentation add Signed-off-by: Derek Ho <dxho@amazon.com> --------- Signed-off-by: Derek Ho <dxho@amazon.com>
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.