This repository has been archived by the owner on May 12, 2021. It is now read-only.
Experimental Improvements - Feedback Only - Do Not Merge #854
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.
This is a PR to get feedback on some minor improvements that I was experimenting with. If the community finds any of this useful, I will open a proper PR and JIRA for this work. All feedback welcome; positive or negative.
Note: This PR should not be merged.
Faster CI Builds
The first piece here is that I leveraged Travis' Matrix functionality so that the unit tests, integration tests, web unit tests, and license check runs in parallel rather than sequentially.
Benefit 1: Prior to this change the CI builds take anywhere between 30 - 34 minutes. After this change the last 4 test builds have taken 24m 49s, 26m 20s, 23m 40s, and 24m 31s. This is not huge, but seems to be an incremental improvement nonetheless.
Benefit 2: This also helps when in the future we need need to add additional validation/functionality to the CI build. Any additional functionality will easily run in parallel and not unnecessarily extend the overall build time.
Automate Maven Installation
There is a tool called Maven Wrapper that will automatically install Maven for a user. And also importantly, it will install the exact correct version that we specify. I found this mentioned in the Travis documentation, so I assume it has a large enough following.
My thought is that anything we can do to reduce friction for a new user to work with Metron is a good thing. At the very least this simplifies prerequisite installation and can prevent one source of errors.
Instead of installing Maven manually and then running
mvn clean install
, a user can just run./mvn clean install
. This will automatically install the correct version of Maven in Windows, Mac, or Linux before building Metron. This also works correctly in Travis.I should also mention this is backwards compatible. If you want to use your own mvn, then feel free to continue on with
mvn clean install
.The ./mvn and ./mvn.cmd files were generated by me simply running
mvn -N io.takari:maven:wrapper
. We would run the same sort of command again to update these scripts should we need to.