This repository has been archived by the owner on May 12, 2021. It is now read-only.
METRON-2257: Metron-Alerts GUI testing failing on MacOS builds #1513
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contributor Comments
This PR resolves a regression introduced in the dependency upgrades in METRON-2243 (Thanks for catching this, @tigerquoll!)
I haven't quite identified the 'why' to this bug, but it looks like Cypress' update to use Electron 61 in release 3.3.0 is causing some issues with Cypress' click functionality. See the below gif, which is a recording of tests being run in Electron 61. You can see in the test side panel that the PCAP link was successfully clicked, but the route quickly changes from
/pcap
back to/alerts-list
. The error complains about an xhr request that was never detected, probably because we weren't on the pcap page long enough to fire the request. The failures are random and differ from test run to test run, but in every video I captured the cause shows to stem from the route never changing after clicking the PCAP link.I reverted Cypress to release 3.2.0, which unfortunately introduces a high-vulnerability nested dependency. I created an issue in the Cypress repository. Hopefully we can get this resolved quickly.
New Security Vulnerability
With this dependency downgrade comes a nested dependency (lodash) that contains a high-severity security vulnerability. However, as the maintainers of Cypress have pointed out, it isn't susceptible to this security issue since it's locally run software.
Obviously, this is not ideal and will probably be flagged with a security audit. However, this is the only way to resolve this issue for now. While it is possible that I could edit the package-lock.json file, doing so is not ideal because it can be easily overridden with a user running
npm i
(resolving merge conflicts comes to mind here).Testing
NOTE: We've only detected this on macOS, so you'll need that to test.
From the root of the project, run
mvn install -pl :metron-alerts
. If testing on master, it will fail with random Cypress failures. If running on this branch, everything should pass as it should.Pull Request Checklist
Thank you for submitting a contribution to Apache Metron.
Please refer to our Development Guidelines for the complete guide to follow for contributions.
Please refer also to our Build Verification Guidelines for complete smoke testing guides.
In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following:
For all changes:
For code changes:
Have you included steps to reproduce the behavior or problem that is being changed or addressed?
Have you included steps or a guide to how the change may be verified and tested manually?
Have you ensured that the full suite of tests and checks have been executed in the root metron folder via:
n/a
Have you written or updated unit tests and or integration tests to verify your changes?If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent?
For documentation related changes:
n/a
Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes viasite-book/target/site/index.html
:n/a
Have you ensured that any documentation diagrams have been updated, along with their source files, using draw.io? See Metron Development Guidelines for instructions.Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.
It is also recommended that travis-ci is set up for your personal repository such that your branches are built there before submitting a pull request.