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

Add functional test for datasources at observability dashboards plugin #987

Merged
merged 3 commits into from
Jan 15, 2024

Conversation

RyanL1997
Copy link
Contributor

Description

Add functional test for datasources at observability dashboards plugin

Check List

  • Commits are signed per the DCO using --signoff

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.

@RyanL1997
Copy link
Contributor Author

RyanL1997 commented Jan 3, 2024

Facing the errors of OS set up step in observability e2e workflow (https://github.com/opensearch-project/opensearch-dashboards-functional-test/actions/runs/7402681376/job/20141042426?pr=987#step:6:13289):

Error: 1-03T21:40:09,706][ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [fv-az1016-625] uncaught exception in thread [main]
org.opensearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to load plugin class [org.opensearch.security.OpenSearchSecurityPlugin]
	at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:184) ~[opensearch-3.0.0.jar:3.0.0]
	at org.opensearch.bootstrap.OpenSearch.execute(OpenSearch.java:171) ~[opensearch-3.0.0.jar:3.0.0]
	at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:104) ~[opensearch-3.0.0.jar:3.0.0]
	at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138) ~[opensearch-cli-3.0.0.jar:3.0.0]
	at org.opensearch.cli.Command.main(Command.java:101) ~[opensearch-cli-3.0.0.jar:3.0.0]
	at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:137) ~[opensearch-3.0.0.jar:3.0.0]
	at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:103) ~[opensearch-3.0.0.jar:3.0.0]
Caused by: java.lang.IllegalStateException: failed to load plugin class [org.opensearch.security.OpenSearchSecurityPlugin]
	at org.opensearch.plugins.PluginsService.loadPlugin(PluginsService.java:791) ~[opensearch-3.0.0.jar:3.0.0]
	at org.opensearch.plugins.PluginsService.loadBundle(PluginsService.java:731) ~[opensearch-3.0.0.jar:3.0.0]
	at org.opensearch.plugins.PluginsService.loadBundles(PluginsService.java:533) ~[opensearch-3.0.0.jar:3.0.0]
	at org.opensearch.plugins.PluginsService.<init>(PluginsService.java:195) ~[opensearch-3.0.0.jar:3.0.0]
	at org.opensearch.node.Node.<init>(Node.java:484) ~[opensearch-3.0.0.jar:3.0.0]
	at org.opensearch.node.Node.<init>(Node.java:411) ~[opensearch-3.0.0.jar:3.0.0]
	at org.opensearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:242) ~[opensearch-3.0.0.jar:3.0.0]
	at org.opensearch.bootstrap.Bootstrap.setup(Bootstrap.java:242) ~[opensearch-3.0.0.jar:3.0.0]
	at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:404) ~[opensearch-3.0.0.jar:3.0.0]
	at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:180) ~[opensearch-3.0.0.jar:3.0.0]
	... 6 more

@derek-ho
Copy link
Contributor

derek-ho commented Jan 9, 2024

Will be unblocked when #981 is merged

@RyanL1997
Copy link
Contributor Author

The observability workflow is stucking there for 4+ hrs (See log: https://github.com/opensearch-project/opensearch-dashboards-functional-test/actions/runs/7506009472/job/20436491850?pr=987).

According to the above, I have run my code change on my local and here are the results:
Headless run in terminal:
Screenshot 2024-01-12 at 2 49 46 PM

Recorded video in browser:

7_datasources_dashboard.spec.js.mp4

(cc. @Hailong-am , @ruanyl , @wanglam )

Signed-off-by: Ryan Liang <[email protected]>
@SuZhou-Joe
Copy link
Member

stucking there for 4+ hrs
@RyanL1997 , I am sorry to say that Cypress(9.6.0) with latest Chrome/Chromium browser is using up the memory in github CI and thus hang the test case.

For now we recommend you post the test result in your local env as a workaround.

@SuZhou-Joe SuZhou-Joe merged commit 8cd68dc into opensearch-project:main Jan 15, 2024
36 of 37 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 15, 2024
#987)

* Add functional test for datasources at observability dashboards plugin

Signed-off-by: Ryan Liang <[email protected]>

* Extend the header locating to 2 mins

Signed-off-by: Ryan Liang <[email protected]>

* Fix lint

Signed-off-by: Ryan Liang <[email protected]>

---------

Signed-off-by: Ryan Liang <[email protected]>
(cherry picked from commit 8cd68dc)
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

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-987-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8cd68dc509eeb01ca7658f1f784201ce117cf009
# Push it to GitHub
git push --set-upstream origin backport/backport-987-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 base branch is 2.x and the compare/head branch is backport/backport-987-to-2.x.

@sejli sejli mentioned this pull request Jan 26, 2024
1 task
RyanL1997 added a commit to RyanL1997/opensearch-dashboards-functional-test that referenced this pull request Jan 30, 2024
opensearch-project#987)

* Add functional test for datasources at observability dashboards plugin

Signed-off-by: Ryan Liang <[email protected]>

* Extend the header locating to 2 mins

Signed-off-by: Ryan Liang <[email protected]>

* Fix lint

Signed-off-by: Ryan Liang <[email protected]>

---------

Signed-off-by: Ryan Liang <[email protected]>
ruanyl pushed a commit that referenced this pull request Feb 1, 2024
…ashboards plugin (#1024)

* Add functional test for datasources at observability dashboards plugin (#987)

* Add functional test for datasources at observability dashboards plugin

Signed-off-by: Ryan Liang <[email protected]>

* Extend the header locating to 2 mins

Signed-off-by: Ryan Liang <[email protected]>

* Fix lint

Signed-off-by: Ryan Liang <[email protected]>

---------

Signed-off-by: Ryan Liang <[email protected]>

* Change the assertions check for urls

Signed-off-by: Ryan Liang <[email protected]>

* Fix lint

Signed-off-by: Ryan Liang <[email protected]>

---------

Signed-off-by: Ryan Liang <[email protected]>
Co-authored-by: Hailong Cui <[email protected]>
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.

4 participants