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

security analytics dashboard plugin cypress tests update #657

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jovancacvetkovic
Copy link

Description

Syncs new rule tests of the security analytics dashboard plugin with functional tests

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.

@AWSHurneyt
Copy link
Contributor

I don't seem to have permissions to apply labels, or run the checks for PRs in this repo. Would someone mind adding the backport 2.x label to this PR? This is targeting the 2.8 release.

@AWSHurneyt
Copy link
Contributor

@CCongWang @kavilla
It looks like the Security Analytics Release tests, Reports Release tests, and Backport workflows failed with only a This job failed error appearing on the details page. Would you happen to have an idea of what could cause that?

I also noticed that the CodeQL workflow failed with This version of the CodeQL Action was deprecated on January 18th, 2023, and is no longer updated or supported, but I don't think that would necessarily block the PR.

}
);

export const createDetector = (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a customized command with the same name createDetector in https://github.com/opensearch-project/opensearch-dashboards-functional-test/blob/main/cypress/utils/plugins/security-analytics-dashboards-plugin/detectors.js#L9, not sure if it's confusing to use the same name but have different function

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this file has both customized commands and a util function, and this file is imported in commands.js, should we just have commands in this file?

Copy link
Author

@jovancacvetkovic jovancacvetkovic May 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CCongWang The util function is removed. I'll refactor it in some next PR.

@@ -3,14 +3,119 @@

declare namespace Cypress {
interface Chainable<Subject> {
/**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have much context on this file, but looks like most of the customized commands are not added in this file? I see there are three ways to add customized commands:

Do we have a preference? @kavilla @ashwin-pc @ohltyler

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CCongWang I have refactored commands, all are now in the commands file and declared in index.d.ts within the plugins folder.

@CCongWang
Copy link
Collaborator

Hi @AWSHurneyt , for failed CodeQL workflow, looks like the deprecation message is just a warning, see this successful example: https://github.com/opensearch-project/opensearch-dashboards-functional-test/actions/runs/4636082170/jobs/8249870977?pr=608
the true error is:

Uploading results
  Processing sarif files: ["/home/runner/work/opensearch-dashboards-functional-test/results/javascript.sarif"]
  Uploading results
  Error: Server Error

I'm gonna rerun to see if it's something transient

@CCongWang
Copy link
Collaborator

@AWSHurneyt for the other failed workflows with This job failed, I guess it was due to some flakyness, rerunning

Signed-off-by: Jovan Cvetkovic <[email protected]>
Signed-off-by: Jovan Cvetkovic <[email protected]>
@jovancacvetkovic
Copy link
Author

jovancacvetkovic commented May 15, 2023

Would someone re-run the tests? I don't have permission to run the tests.

@jovancacvetkovic
Copy link
Author

jovancacvetkovic commented May 17, 2023

Security analytics team is working on a problem with the plugin build, the fix is in the PR but will have to wait for it to be merged before the tests for the security analytics can be run successfully.

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.

5 participants