Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

AGPUSH-937: optimize frontend cleaning workflow #355

Closed

Conversation

lfryc
Copy link
Contributor

@lfryc lfryc commented Aug 12, 2014

https://issues.jboss.org/browse/AGPUSH-937

first build of admin-ui/ obviously takes time, but then it should cache as much things as possible, see the JIRA for reference times ^

@lfryc
Copy link
Contributor Author

lfryc commented Aug 12, 2014

Could you please test this? 🏈 @matzew @secondsun @abstractj

@@ -111,8 +108,17 @@

<profiles>
<profile>
<!-- if you want to run tests, make sure you also enable 'test' profile -->
<id>dev</id>
Copy link
Contributor

Choose a reason for hiding this comment

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

the dev is mentioned on README (root and admin-ui folders). let's update those too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@lfryc
Copy link
Contributor Author

lfryc commented Aug 12, 2014

@TadeasKriz @vibe13 @lholmquist Hey guys, just in case you would like to add your $0.02..

@matzew
Copy link
Contributor

matzew commented Aug 13, 2014

👍 perfect! Improved from around 2min, to 10 secs :-)

@TadeasKriz
Copy link
Contributor

@lfryc I still think, that the development mode is something to be opt-in, not the other way around and that "mvn clean package" should work each time without being affected by branch switches. If the second condition will be met even without the /dist and /tmp directory deletion, I'm ok with that.

@lfryc
Copy link
Contributor Author

lfryc commented Aug 13, 2014

If you switch branches, all tooling we use will detect changes in the configuration files and behave accordiongly:

  • frontend-maven-plugin & Node/NPM versions - will check and eventually update specified versions
  • bower.json - Bower will add/upgrade specified packages
  • package.json/npm-shrinkwrap.json - NPM will add/upgrade specified packages

NPM/Bower won't remove packages that were downloaded before and are missing in the branch you switch to. That's where force-clean comes in.

I have tested this on current versions of plugin we use and it works as expected.

@lfryc
Copy link
Contributor Author

lfryc commented Aug 13, 2014

dist/ and .tmp/ folders will be deleted anyway, even during $ mvn clean package

@TadeasKriz
Copy link
Contributor

In that case I'm +1 on it. The main goal there is to be able to build without problems caused by uncleaned node.js caches when you checkout different commit and that should be now fixed as you said, so let's merge it! :)

@abstractj
Copy link
Contributor

Testing it here

@abstractj
Copy link
Contributor

It pretty much depends on network bandwidth + machine, but here I noticed the improvement

  • With unit tests
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:15.812s
[INFO] Finished at: Wed Aug 13 08:35:01 BRT 2014
[INFO] Final Memory: 80M/191M
[INFO] ------------------------------------------------------------------------
  • Skipping tests
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:13.252s
[INFO] Finished at: Wed Aug 13 08:40:21 BRT 2014
[INFO] Final Memory: 80M/191M

+1 Good to merge

@danielpassos
Copy link
Collaborator

ZOMG ❤️ it

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:38.700s
[INFO] Finished at: Wed Aug 13 13:31:51 BRT 2014
[INFO] Final Memory: 23M/229M
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.346s
[INFO] Finished at: Wed Aug 13 13:33:34 BRT 2014
[INFO] Final Memory: 23M/229M
[INFO] ------------------------------------------------------------------------

👍 👍 👍 👍 👍 👍 👍 👍

@danielpassos
Copy link
Collaborator

Landed at d61593d

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants