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

[BUG][MD] Cypress tests for multiple datasource are failing #3843

Closed
abbyhu2000 opened this issue Apr 13, 2023 · 6 comments
Closed

[BUG][MD] Cypress tests for multiple datasource are failing #3843

abbyhu2000 opened this issue Apr 13, 2023 · 6 comments
Assignees
Labels
bug Something isn't working ci multiple datasource multiple datasource project

Comments

@abbyhu2000
Copy link
Member

Describe the bug
Currently the cypress tests for multiple datasource are failing.
Screenshot 2023-04-13 at 1 17 41 PM

I think the default schema config value for multiple datasource is false, so MD is not enabled when cypress tests are trying to run. https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/plugins/data_source/config.ts#L15

@abbyhu2000 abbyhu2000 added bug Something isn't working multiple datasource multiple datasource project labels Apr 13, 2023
@kavilla kavilla removed the untriaged label Apr 13, 2023
@zhongnansu zhongnansu linked a pull request Apr 13, 2023 that will close this issue
8 tasks
@zhongnansu zhongnansu added the ci label Apr 13, 2023
@zhongnansu
Copy link
Member

zhongnansu commented Apr 13, 2023

@abbyhu2000 By requirement, we shouldn't enable datasource by default in osd.yml. But in the cypress workflow, we are using the default config in functional test repo cypress.json to decide which test to run. Datasource test flag is enabled in cypress.json, but data source feature is not enabled when spinning up the test server in cypress_test_workflow. We have below options to fix this issue.

  1. In functional test repo, revert the cypress.json change in this PR, to mark data source test flag to be false. This will lead to the workflow in functional test repo to never run data source feature related tests.
  2. In OSD repo -> cypress workflow, set env viable CYPRESS_ DATASOURCE_MANAGEMENT_ENABLED to false, which will not trigger actual datasource functional test to run. Disable datasource from cypress test workflow #3845
  3. In OSD repo -> cypress workflow, find a way to enable plugins when spinning up the test server, similar to what functional test repo is doing here. https://github.com/opensearch-project/opensearch-dashboards-functional-test/blob/7ec51edeacd911c6166e93a5edcfd2524ce1db0d/.github/workflows/cypress-workflow-bundle-snapshot-based.yml#L28

Not sure how much effort for option 3, which seems to be a long term solution. But to mitigate the issue, I'd suggest we go with option 1.

@joshuarrrr
Copy link
Member

I think we do something similar for visbuilder? It's experimental, so disabled by default in OSD, but it should always be enabled in the test server for the purpose of testing.

@zhongnansu
Copy link
Member

@joshuarrrr visbuilder is actually enabled by default in its config.ts.

@zhongnansu
Copy link
Member

@joshuarrrr As my option 3 explains, test server in OSD cypress flow doesn't seem to provide option to enable/disable a osd setting, correct me if I'm wrong

@zhongnansu
Copy link
Member

PR opened in function test repo opensearch-project/opensearch-dashboards-functional-test#613

@zhongnansu
Copy link
Member

cypress passes now https://github.com/opensearch-project/OpenSearch-Dashboards/actions/runs/4694010639/jobs/8339937917

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci multiple datasource multiple datasource project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants