[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16495435#comment-16495435 ] ASF GitHub Bot commented on METRON-1480: Github user pono closed the pull request at: https://github.com/apache/metron/pull/952 > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Assignee: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16494252#comment-16494252 ] ASF GitHub Bot commented on METRON-1480: Github user nickwallen commented on the issue: https://github.com/apache/metron/pull/952 -1 as this has become an abandoned PR. I will open a request to close this. > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Assignee: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16475988#comment-16475988 ] ASF GitHub Bot commented on METRON-1480: Github user nickwallen commented on the issue: https://github.com/apache/metron/pull/952 @sardell Thanks. @xyztdanid4 Please let us know if you feel this PR is still relevant. If not, please close the PR. Otherwise, the PR may be closed as inactive according to the Metron Development Guidelines. > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Assignee: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16475825#comment-16475825 ] ASF GitHub Bot commented on METRON-1480: Github user sardell commented on the issue: https://github.com/apache/metron/pull/952 > What yarn does is that reduces the possibility of version mismatch of the dependencies by importing the dependencies subdependency in the right version I believe npm also does this with the addition of [package-lock.json](https://docs.npmjs.com/files/package-lock.json). > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Assignee: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16394908#comment-16394908 ] ASF GitHub Bot commented on METRON-1480: Github user xyztdanid4 commented on a diff in the pull request: https://github.com/apache/metron/pull/952#discussion_r173710125 --- Diff: metron-interface/metron-alerts/pom.xml --- @@ -35,36 +35,36 @@ com.github.eirslett frontend-maven-plugin -1.3 +1.6 ./ ${node.version} -${npm.version} - false +${yarn.version} + false generate-resources -install node and npm +install node and yarn -install-node-and-npm +install-node-and-yarn generate-resources -npm install +yarn install -npm +yarn -install + install --mutex network --ignore-engines --pure-lockfile --- End diff -- @merrimanr I would like to thank you for your help with pointing out the problem is with the CI. I tried to set the cache folder differently for each angular project, but somehow I got some permission errors. The solution is that I introduced the 'mutex network' flag on the yarn install, so it will prevent multiple installation on the same time by yarn. > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16392802#comment-16392802 ] ASF GitHub Bot commented on METRON-1480: Github user xyztdanid4 commented on the issue: https://github.com/apache/metron/pull/952 @merrimanr As we agreed yesterday I did the required changes in the pom xml-s. I had to update the node dependency of the projects, otherwise the build was failed, cause one of the dependencies was dependent on node8. There is no equivalent command to npm --prefix in yarn, so I updated the readme to just cd into that directory where the install step is required. When we build the metron-alert project (angular4), there was an error, mainly because angular4 uses AOT as default builder strategy. I fixed this by addig env=prod to the package json. > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389927#comment-16389927 ] ASF GitHub Bot commented on METRON-1480: Github user merrimanr commented on the issue: https://github.com/apache/metron/pull/952 I think we are on board with switching to yarn so no concerns there. There was a discussion on it but if anyone now feels differently, speak up. Sounds like we still have a lot of work to do. I would suggest reviewing the metron-config and metron-alerts READMEs and update them appropriately. In fact, I would just search the whole project for npm commands and switch to yarn as needed. You will definitely need to run this up in full dev and verify everything works. Our maven front end plugin will also need to be reviewed and updated: https://github.com/eirslett/frontend-maven-plugin. We use that in metron-config and metron-alerts. > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389920#comment-16389920 ] ASF GitHub Bot commented on METRON-1480: Github user merrimanr commented on a diff in the pull request: https://github.com/apache/metron/pull/952#discussion_r172937150 --- Diff: metron-interface/metron-config/package.json --- @@ -33,6 +28,11 @@ "@angular/platform-browser": "2.0.0", "@angular/platform-browser-dynamic": "2.0.0", "@angular/router": "3.0.0", +"@types/ace": "0.0.32", --- End diff -- No I was just curious. If Yarn did this automatically we might as well leave it that way. No need to revert. > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389917#comment-16389917 ] ASF GitHub Bot commented on METRON-1480: Github user xyztdanid4 commented on the issue: https://github.com/apache/metron/pull/952 @merrimanr although it should work with npm as well, cause then it will use the package.json to install the dependencies. > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389913#comment-16389913 ] ASF GitHub Bot commented on METRON-1480: Github user xyztdanid4 commented on a diff in the pull request: https://github.com/apache/metron/pull/952#discussion_r172936489 --- Diff: metron-interface/metron-config/package.json --- @@ -33,6 +28,11 @@ "@angular/platform-browser": "2.0.0", "@angular/platform-browser-dynamic": "2.0.0", "@angular/router": "3.0.0", +"@types/ace": "0.0.32", --- End diff -- Yes. I was not enough carefully. Yarn did the rearrangement, but I can move the dependencies back to their original place if you would like to. > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389912#comment-16389912 ] ASF GitHub Bot commented on METRON-1480: Github user xyztdanid4 commented on the issue: https://github.com/apache/metron/pull/952 @merrimanr Yes this is the right way to switch to yarn. Yes we have install yarn locally. I did not know that we have so much dependency on npm. But for me it was hard to add new dependencies using npm, cause it was constantly failing. And yes I would recommend to use yarn, at least for the front end builds. What yarn does is that reduces the possibility of version mismatch of the dependencies by importing the dependencies subdependency in the right version. So yes we have to use yarn commands if we merge this PR. > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389902#comment-16389902 ] ASF GitHub Bot commented on METRON-1480: Github user merrimanr commented on a diff in the pull request: https://github.com/apache/metron/pull/952#discussion_r172934046 --- Diff: metron-interface/metron-config/package.json --- @@ -33,6 +28,11 @@ "@angular/platform-browser": "2.0.0", "@angular/platform-browser-dynamic": "2.0.0", "@angular/router": "3.0.0", +"@types/ace": "0.0.32", --- End diff -- What was the reason for rearranging the dependencies? It's not a big deal but it's distracting and makes reviewing harder. > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389897#comment-16389897 ] ASF GitHub Bot commented on METRON-1480: Github user xyztdanid4 commented on the issue: https://github.com/apache/metron/pull/952 @merrimanr > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389896#comment-16389896 ] ASF GitHub Bot commented on METRON-1480: Github user xyztdanid4 commented on a diff in the pull request: https://github.com/apache/metron/pull/952#discussion_r172932830 --- Diff: metron-interface/metron-config/package.json --- @@ -33,6 +28,11 @@ "@angular/platform-browser": "2.0.0", "@angular/platform-browser-dynamic": "2.0.0", "@angular/router": "3.0.0", +"@types/ace": "0.0.32", --- End diff -- No there were no changes other than rearrange of the dependencies. About the main attribute, in our case it will do nothing. It defines the entry point of the application if we would SystemJS or requireJS. It is the default setting for yarn. > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389885#comment-16389885 ] ASF GitHub Bot commented on METRON-1480: Github user merrimanr commented on the issue: https://github.com/apache/metron/pull/952 I'm having trouble understanding what this PR actually does. I see that package-lock.json was removed and yarn.lock was added. Is that all that's needed to switch to yarn? Do we need to also update our build commands to match those [here](https://yarnpkg.com/en/docs/usage)? What considerations are there for development? Are we supposed to be using yarn commands now instead of npm commands? Do we need to install yarn locally? We probably need to review our documentation and rpm build processes too. We use npm all over the place. > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389879#comment-16389879 ] ASF GitHub Bot commented on METRON-1480: Github user merrimanr commented on a diff in the pull request: https://github.com/apache/metron/pull/952#discussion_r172927751 --- Diff: metron-interface/metron-alerts/package.json --- @@ -27,8 +27,8 @@ "core-js": "^2.4.1", "font-awesome": "^4.7.0", "moment": "^2.18.1", -"pikaday-time": "^1.6.1", "ng2-dragula": "^1.5.0", +"pikaday-time": "^1.6.1", --- End diff -- See comment for metron-config/package.json. > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389878#comment-16389878 ] ASF GitHub Bot commented on METRON-1480: Github user merrimanr commented on a diff in the pull request: https://github.com/apache/metron/pull/952#discussion_r172927486 --- Diff: metron-interface/metron-config/package.json --- @@ -33,6 +28,11 @@ "@angular/platform-browser": "2.0.0", "@angular/platform-browser-dynamic": "2.0.0", "@angular/router": "3.0.0", +"@types/ace": "0.0.32", --- End diff -- Were there any real changes made to this file? It looks like some dependencies were simply rearranged. I do see the addition of `"main": "index.js"`. What is the purpose of that? > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389690#comment-16389690 ] ASF GitHub Bot commented on METRON-1480: Github user xyztdanid4 commented on a diff in the pull request: https://github.com/apache/metron/pull/952#discussion_r172879403 --- Diff: metron-interface/metron-alerts/package-lock.json --- @@ -1,6427 +0,0 @@ -{ --- End diff -- I think that was the problem! Thanks. @cestella > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (METRON-1480) Add yarn as default build tool for the frontend
[ https://issues.apache.org/jira/browse/METRON-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389468#comment-16389468 ] ASF GitHub Bot commented on METRON-1480: GitHub user xyztdanid4 opened a pull request: https://github.com/apache/metron/pull/952 Metron-1480 Add yarn as default build tool for the frontend Updated the build tool to yarn for the frontend project to avoid npm instability during dependency adding. ### For all changes: - [X] Is there a JIRA ticket associated with this PR? If not one needs to be created at [https://issues.apache.org/jira/browse/METRON-1480](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [X] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? ### 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? - [X] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [ ] Have you written or updated unit tests and or integration tests to verify your changes? - [X] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [X] 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: - [ ] 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 via `site-book/target/site/index.html`: ``` cd site-book mvn site ``` 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](https://travis-ci.org) is set up for your personal repository such that your branches are built there before submitting a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/xyztdanid4/metron METRON-1480 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/metron/pull/952.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #952 commit 0812c6eca0bc009ddd0658f7976f5734daedb859 Author: Daniel TothDate: 2018-03-07T10:40:01Z Add yarn as build tool commit 9117dac298a42a0b434ab933354a54542724b6bc Author: Daniel Toth Date: 2018-03-07T11:47:50Z Update ts to avoid 'app module is not an ng module error on build' > Add yarn as default build tool for the frontend > --- > > Key: METRON-1480 > URL: https://issues.apache.org/jira/browse/METRON-1480 > Project: Metron > Issue Type: Improvement >Reporter: Daniel Toth >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)