zc.buildout tricks

Maybe everyone is already aware of them, but just in case…

zc.buildout is THE building block that assembles Plone together.

It’s been around for quite a while (+10 years) and it has plenty of features.

Two of them which I’m enjoying a lot lately are:

./bin/buildout install code-analysis

install allows you to override which parts are going to be installed and thus it allows, like in the example above, reduce the amount of packages to fetch and things to build. Which for something like jenkins.plone.org can make quite a lot of sense to use it more and more.

./bin/buildout annotate

annotate outputs the complete configuration that buildout will use as if it was everything in a single file. This is great for debugging “why my configuration is overriden or not being used at all” kind of errors.

1st WPOD recap

Last Friday the first WPOD happened around the globe.

Here is what was done on the Berlin gathering:

Hopefully other participants around the globe will share their achievements as well!

Are you already planning the next WPOD? Mark it on your calendar May 29th.

Happy hacking!

Testing pull requests and multi-repository changes

At Plone we use Continuous Integration (with Jenkins) to keep us aware of any change made on any of our +200 of packages that break the tests.

Thus making it feasible to spot where the problem was introduced, find the changes that were made and report back to the developer that made the changes to warn him/her about it.

A more elaborate step by step description is on our CI rules, be sure to read them!

At the same time though, we use GitHub pull requests to make code reviews easy and have a way to provide feedback and context to let everyone give their opinion/comment on changes that can be non-trivial.

Sadly, pull requests and multi-repository changes can not be tested directly with Jenkins, yes, there is a plugin for that, but our CI setup is a bit (note the emphasis) more complex than that…

Fortunately we came up with two solutions (it’s Plone at the end, we can not have only one solution :D)

Single pull requests

If you have a pull request on a core package that you want to test follow these steps:

  1. Get the pull request URL
  2. Go to http://jenkins.plone.org and login with your GitHub user
  3. Go to pull-request job: http://jenkins.plone.org/job/pull-request (you can see it always at the front page of jenkins.plone.org)
  4. Click on the Build with Parameters link on the left column
  5. Paste the pull request URL from #1 step
  6. Click on Build

Once it runs you will get an email with the result of the build. If everything is green you can add a comment on the pull request to let everyone know that tests pass.

Note: it’s your responsibility to run that job with your pull request and that changes made on other packages after tests started running can still make your pull request fail later on, so even if the pull-request job is green, be sure to keep an eye on the main jenkins jobs as soon as you merge your pull request.

Example: Remove Products.CMFDefault from Products.CMFPlone (by @tomgross)

Pull request: https://github.com/plone/Products.CMFPlone/pull/438

Jenkins job: http://jenkins.plone.org/job/pull-request/80

Multi-repository changes

When the changes, like massive renamings for example, are spread over more than one repository the approach taken before doesn’t work, as the pull-request Jenkins job is only able to change one single repository.

But we, the CI/testing team, have another ace on our sleeves: create a buildout configuration in the plips folder on buildout.coredev (branch 5.0) that lists all your repositories and which branch should be used, see some examples.

Once you have that cfg file, you can politely ask the CI team to create a Jenkins job for you. They will make a lot of clever things to make that work on jenkins (3 lines change plus following some instructions) and sooner or later a new Jenkins job will show up on the PLIPs tab on jenkins.plone.org.

Rinse and repeat!

Extra bonus and caveats

All Jenkins jobs, be it the pull-request, PLIPs and of course the core jobs, are configured to send an email to the one that triggered the job, so don’t worry about how long do they take to run, once they are finished you will get notified.

The caveat is that the above is only valid for changes targeting Plone 5. We didn’t put the extra effort to make it sure it also works for pull requests (either single or multi-repository) aimed at Plone 4.3. It’s quite trivial to add it for multi-repositories, a bit more work to make it run on single pull requests, still feasible to do if there’s enough people asking for it.

Hopefully the amount of pull requests for Plone 4.3 will decrease more and more as Plone 5 is getting closer and closer one pull request at a time :)

Now there’s no excuse on pushing changes to master without having tested them before on jenkins.plone.org!

Proposals on improvements and suggestions are always welcome on the issue tracker for jenkins.plone.org GitHub repository. Help on handling all those issues are, of course, also welcomed!

Happy testing!

WPOD

WPOD: World Plone Office Day

During this year’s PLOG I presented the simple idea behind WPOD:

  • every last Friday of the month
  • meet somewhere (remotely is fine as well, see below)
  • hack on Plone instead of your regular work
  • Rinse and repeat

That’s it, as simple and as easy as it can be.

Mark on your calendars every last Friday of the month, you have an appointment with the Plone community to bring Plone one step further ahead!

WPOD in Berlin

Preparations are being made for the first ever WPOD in Berlin that my company will gladly host. If you happen to be around Berlin, please contact me telling that you are coming!

The location is Hegelplatz 1, 10117 Berlin.

You are welcome during all day long. Plonistas are expected to come during the morning, enjoy some lunch together, and hack away until late afternoon.

WPOD around the world

If you happen to not be in Berlin, fear not, an irc channel will be available (#sprint on irc.freenode.net) so you can feel the same experience as in any other city hosting a WPOD.

Credit where credit’s due

That’s not an original idea of mine, nor is something that I thought of myself alone, Philip Bauer already tried to present the very same idea on last year’s Plone Conference in Bristol.

Later on, during the Bycicle sprint in Berlin, Stefania and I discussed about it and defined the format as it will start with.

Thanks to them for their bright minds and clever ideas!

Future

Within 10 days the first WPOD will happen, Plonistas will hack/plan/design away and Plone will get better and better.

I hope that other cities and individuals alike will start participating on WPOD, the more we are the bolder the change we will make.

There are some plans to put all the relevant information regarding WPOD on plone.org, either on the current website, or even better on the newer plone.org that is on the making (watch here for tickets ready to be fixed by any of you!).

Happy hacking!

Update: a meetup has been created, please RSVP there.

first GUADEC!

Following the meme…

Not for me nor for Sílvia of course, but for Ona!

She even attended some talks! :)

Ona on a talk

Sadly we only stayed for some days, more to catch with some of you[1] and the weather was quite hard for her.

All in all a short but intense GUADEC!

It was really nice to meet all of you again. Hopefully by next year Ona is going to speak some so she can send her first paper :D

[1] Now we know that Patri and Calvaris will take care of her for next GUADEC :)

GUADEC tip of the day

As everyone attending GUADEC is right now enjoying the party at Fléda, and Sílvia and me are missing it for a good reason :) let me give you a tip for the remaining days:

Are you feeling hungry and looking for a delicious place to eat some arabic/vegeterian food here at Brno? Look no longer Kupé is what you are looking for!

Not only the food is great but their stuff is really helpful, they speak perfect English (and the menu is also available in English) and the smoothies are awesome!

Oh and as a late notice:

I am attending GUADECI am attending GUADECI am attending GUADECTriple as for me, Sílvia and Ona :)

Have you ever smelled a newborn?

That’s what the midwife asked me 20 minutes later after Ona ((ocean weave in Catalan, and a friend also told us that means beautiful in Euskera)), our first daughter, was born (on April 3th).

lil-IMG_8179

More photos if you wish :)

And, no, I haven’t smelled any newborn, but man, they smell so great!!! ((no wonder why cosmetic companies go after placentas…))

Both mama and kid are doing fine, circa usual newborn issues :)

To cope up with all advices/tips that everyone is giving you about rising kids, we found a great book ((advised by my sister)): Kiss Me!: How to Raise Your Child with Love. Which is the English version of this other one (in Spanish and also longer): Comer, amar, mamar.

It’s amazing!! :)

GNOME 3.8

logotip del GNOMEJa fa uns dies que va sortir el GNOME 3.8! Les notes de traducció expliquen algunes de les parts més destacades d’aquesta versió nova.

Quant a la traducció al català del GNOME 3.8, només puc donar els meus sincers agraïments a en Joan Duran, gràcies!!!

Ja fa un parell o tres de versions que pràcticament ho traduïm tot entre ell i jo, així que si teniu cap interès en ajudar a les traduccions del GNOME, esteu més que convidats a ajudar-nos! ((Comenteu tot el que no s’entengui/quedi clar d’aquella pàgina!))

I no patiu! Encara que tot just ara acabi de sortir el GNOME i per tant quedin 6 mesos per la pròxima versió hi ha molta feina a fer!

Si us agrada traduir la documentació (també és més senzill i no tan tècnic) teniu la documentació del GNOME 3.8 que li fa falta una bona empenta:

Pàgina de la documentació del GNOME 3.8

I si voleu alguna documentació més en concret:

  • Guia d’inici del GNOME (aneu fent-la a parts, no la feu tota de cop!)
  • Guia d’usuari del GNOME (aneu fent-la a parts, no la feu tota de cop!)
  • Les documentacions que tenen un ànec
  • Les documentacions que ja estan a més del 80%
  • Pregunteu a la llista de correu i en uns dies us direm alguna cosa més si ja està tot agafat ;)

Si en canvi preferiu traduir interfície d’usuari, igualment, no patiu! Hi ha traduccions per tothom!

I evidentment qualsevol altre programa que estigui a:

https://l10n.gnome.org/teams/ca/

Que gaudiu del GNOME 3.8!!

On javascript events

One thing that always get on my nerves with Javascript is that it was a pain (until today for me) to get from an HTML element to the actual javascript that runs once you hover, click, etc that element.

I’m a visual kind of guy so my rationale was:

  • I see a button on a webpage that does something that smells like javascripty
  • I open firebug and select that element
  • I expect to have some kind of panel/hint about the events that are registered for that element without success :S

Today, tired of it, I start looking for a solution, and I found an amazing one, let me introduce you visual events 2!

It’s a bookmark that you place on your browser and if you click on it the page gets blue rectangular overlays on all elements that have a javascript event handler!

But not only that, if you hover over one of those boxes you will see what I was expecting from the beginning: the code that is executed and where it lies (which file and line).

Brilliant!