<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 10, 2017 at 2:56 PM, Greg Sheremeta <span dir="ltr"><<a href="mailto:gshereme@redhat.com" target="_blank">gshereme@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I can assist too. What do you need? If it's easier, I'm available on IRC.<br><div class="gmail_extra"><div><div class="gmail-h5"><br><div class="gmail_quote">On Fri, Feb 10, 2017 at 8:00 AM, Sandro Bonazzola <span dir="ltr"><<a href="mailto:sbonazzo@redhat.com" target="_blank">sbonazzo@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Vojtech, can you please help Ryan and Marek with cockpit-ovirt?</div></blockquote></div></div></div></div></div></blockquote><div><br><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">Hi guys, we can organize a short session to explain the changes and help people to use the new packages. Does that make sense?<br><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">Generally, any project using nodejs-modules should move from npm to Yarn (using ovirt-engine-yarn) and then modify the `projects.list` file in nodejs-modules repo, see [1] for reference.<br><br>[1] <a href="https://gerrit.ovirt.org/#/c/71134/">https://gerrit.ovirt.org/#/c/71134/</a><br><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">This triggers new nodejs-modules RPM build, which will contain all dependencies required by all projects defined via the the `projects.list` file.<br><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">If you face issues with CI yum caching like we did in Dashboard (e.g. nodejs-modules defined in .packages file wasn't actually installed), you might try installing it manually in your build script, see [2] for reference.<br><br>[2] <a href="https://gerrit.ovirt.org/#/c/71923/">https://gerrit.ovirt.org/#/c/71923/</a><br></div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><div class="gmail-h5"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Wed, Feb 8, 2017 at 3:29 PM, Vojtech Szocs <span dir="ltr"><<a href="mailto:vszocs@redhat.com" target="_blank">vszocs@redhat.com</a>></span> wrote:<br></span><div><div class="gmail-m_6175038606885669789h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello devs,<br>
<br>
following packages, intended as build-time dependencies of oVirt<br>
JavaScript projects, have been updated:<br>
<br>
* ovirt-engine-nodejs<br>
* ovirt-engine-nodejs-modules<br>
* ovirt-engine-yarn<br>
<br>
If you use those packages, please read on to learn how to adapt your<br>
project. oVirt Dashboard (master) is already adapted and you can use<br>
it as your reference.<br>
<br>
==<br>
<br>
1, move your project from npm to Yarn:<br>
<br>
- using nodejs-modules implies that your project moves from npm to<br>
Yarn, please do this as your first step<br>
- make sure to add yarn.lock file to source control: rm -rf<br>
node_modules && yarn install # generates yarn.lock<br>
- your automation/*.packages should contain something like this:<br>
<br>
ovirt-engine-nodejs-6.9.4<br>
ovirt-engine-nodejs-modules-1.<wbr>0.3<br>
ovirt-engine-yarn-0.19.1<br>
<br>
- since oVirt CI uses yum cache, always specify exact version of<br>
nodejs-modules in your automation/*.packages<br>
- in your RPM build script, make sure to set up Node.js env.: source<br>
/usr/share/ovirt-engine-nodejs<wbr>-modules/setup-env.sh<br>
<br>
==<br>
<br>
2a, dependency handling - 1st time:<br>
<br>
- clone nodejs-modules repo & update the projects.list file - add<br>
URL(s) to your project's files (package.json + yarn.lock)<br>
- bump .z in RPM Version and reset the RPM Release number, submit<br>
patch to Gerrit<br>
- in your project, update automation/*.packages to use the right<br>
nodejs-modules version<br>
<br>
2b, dependency handling - whenever your dependencies change:<br>
<br>
- clone nodejs-modules repo & bump RPM Release number, submit patch to Gerrit<br>
- in your project, update automation/*.packages to use the right<br>
nodejs-modules version<br>
<br>
==<br>
<br>
Q: how does the new nodejs-modules work?<br>
<br>
A: instead of maintaining one big package.json file to specify all<br>
dependencies of all projects (effectively forcing all projects to use<br>
single dependency tree), it contains the projects.list file with<br>
URL(s) to specific project files.<br>
<br>
When building nodejs-modules RPM, it goes through the list of URL(s),<br>
downloading project's files (package.json + yarn.lock), then<br>
downloading required dependencies (using Yarn) and collecting their<br>
.tar.gz sources. The nodejs-modules RPM therefore contains a flat list<br>
of all .tar.gz sources of all dependencies of all projects.<br>
<br>
When you source the setup-env.sh script, it does, among other things,<br>
tell Yarn to use<br>
/usr/share/ovirt-engine-nodejs<wbr>-modules/yarn-offline-cache containing<br>
all .tar.gz sources. Then, it runs Yarn in offline mode to populate<br>
your project's node_modules directory.<br>
<br>
==<br>
<br>
Hope this helps.<br>
<br>
Regards,<br>
Vojtech<br>
______________________________<wbr>_________________<br>
Devel mailing list<br>
<a href="mailto:Devel@ovirt.org" target="_blank">Devel@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman<wbr>/listinfo/devel</a><br>
</blockquote></div></div></div><span class="gmail-m_6175038606885669789HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_6175038606885669789m_5945351494578980669gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Sandro Bonazzola<br>Better technology. Faster innovation. Powered by community collaboration.<br>See how it works at <a href="http://redhat.com" target="_blank">redhat.com</a></div></div></div></div></div></div></div></div>
</font></span></div>
<br>______________________________<wbr>_________________<br>
Devel mailing list<br>
<a href="mailto:Devel@ovirt.org" target="_blank">Devel@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman<wbr>/listinfo/devel</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br></div></div><div class="gmail-m_6175038606885669789gmail_signature"><div dir="ltr"><div>Greg Sheremeta, MBA<br>Red Hat, Inc.<br>Sr. Software Engineer<br><a href="mailto:gshereme@redhat.com" target="_blank">gshereme@redhat.com</a><br></div></div></div>
</div></div>
</blockquote></div><br></div></div>