News about the framework and its uses.
The 3.10 development started during August, with two
important patches: one on the repository / entity API, another one on the boxes /
content navigation components unification (more on this later). Then it somewhat came to a halt, as more work was done on other projects and to stabilize the
3.9 branch. We finally got back on it during September, adding several other major
changes or enhancements.
Cleanup of the repository side entity API, i.e. the API you may use when
writing hooks. Beside simple namespace cleanup (a few renamings), the API has
been modified to move out attributes being edited from the read cache. So now:
- entities do not inherit from dict anymore; access to the dict protocol on an
entity will raise deprecation warnings
- the attributes cache is now a cw_attr_cache dictionary on the entity
- edited attributes are in a cw_edited attribute special object, which is only
available in hooks for a modified entity (i.e.
'[before|after]_[add|update]_entity', you should use the dict protocol on that object to get
modified attributes or to modify what is edited (in 'before' hooks only, and
this is now enforced). This deprecates the former edited_attributes attribute.
Unification of 'boxes' / 'contentnavigation' registries and base classes, into
"contextual components" stored in the 'ctxcomponents' registry. This implied the
introduction of "layout" objects which are appobjects responsible of displaying
the components according to the context they are displayed in.
This separation of content / layout and some css cleanups allows us to move former
boxes and content components into each other's place in the user interface: for
instance, go to your preferences pages and try to move the search box. You now have many
more different locations available. Though one component may not go anywhere, so
forthcoming releases should tweak this to avoid proposing dumb choices. But the hot
stuff is there!
Also, a cache has been set on the registry to avoid recomputing possible
components for each context (place in the ui).
Upgraded jQuery and jQuery UI respectively to version 1.4.2 and 1.8. Removed
jquery.autocomplete.js since jQuery UI provides its own autocomplete
plugin. A cwautocomplete plugin was added in order to keep widgets
as backward compatible as possible. If you used custom autocomplete feature,
you should take a look at this guide.
The RelationFacet base class now automatically proposes to search for
entities without the relation if this is allowed by the schema and if there
are some in current results. Example: search for tickets which are not planned in a version.
Data sources have been modeled as CubicWeb entity type CWSource. The
'sources' file is still there but will now only contains definition of the
system source, as well as default manager account login and password. This
implied changes in instance initialization commands, introduction of a new
'add-source' command to cubicweb-ctl, as well as change in the repository
startup. Also, on a multi-sources instance, we can now search using a facet on
the cw_source relation (a new mandatory metadata relation on each entities)
to filter according to the data source entities are coming from.
Although introduced during 3.9 releases, it's worth mentioning the new support
for multi-columns unicity constraint through yams's __unique_together__
entity type attribute, allowing for unicity constraint enforced by the
underlying database instead of CubicWeb hooks. This is limited and doesn't
work in every configuration, but is a must have when running several distributed
CubicWeb instance of the same application (hence database).
Also as usual, the 3.10 includes a bunch of other minor enhancements, refactorings
and bug fixes. Every introduced change should be backward compatible, except
probably some minor ui details due to the css box simplification. That's it.
So please download and install CubicWeb 3.10 and report us any problem on the
For the "Journées Du Logiciel Libre (JDLL)" in Lyon which will take place the 14th, 15th et 16th of octobre 2010, we will be presenting the semantic side of CubicWeb on Friday 15th. There will be a talk and a tutorial. Details can be found here and there.
If you're around, come and see us!
We recently discovered that the cubicweb.org site (the one you are
probably visiting right now) was suffering from a memory leak. The
munin graphs showed a memory consumption steadily increasing soon
after the instance was started, and this would only stop when all the
memory on the host was exhausted. This was clearly caused by a memory
leak somewhere, either in CubicWeb itself or in a cube used by the
Fig. 1: Munin graphs showing the memory leak in cubicweb.org
Notice the associated service downtimes, and the stabilized memory consumption on Sept 23, after the leak was fixed.
Since Python has a garbage collector, either the leak was occuring in
a C extension, or it was caused by some objects which were not garbage
collectable. A common cause for the latter, as explained in the gc
module documentation, are objects with a __del__ method which are part
of a cycle.
We used the "gc" view, which is an administrative view in CubicWeb, reachable by appending "?vid=gc" at the end of the url of
the root of your instance, if you are a member of the managers group. This view uses the gc module from the
python standard library to see which objects are not garbage
This view showed thousands of instances of
mercurial.url.httphandler. This class indeed has a __del__ method
and instances have a cycle with urllib2.OpenerDirector. Mercurial is
used by the vcsfile cube which regularly polls remote repository
over HTTP, which causes httphandler to be instantiated (and a
reference to be leaked). This problem had gone undetected in mercurial
because most of the time, processes using mercurial over http are
shortlived and the leaked memory is quickly collected by the operating
system. Discussion ensued on the IRC forum #mercurial with the
developers and a patch was submitted which fixes the leak. In order to
avoid the problem with versions of mercurial up to the current one, a
new version of vcsfile including a monkey patch for mercurial was
released and deployed on cubicweb.org!
For that last sprint day, each team made some nice achievements:
- Steph & Alain worked on the mv/cp actions implementation to makes
them working properly and supporting globs. Last but not least, with
a full set of tests.
- Alex & Charles got back what we call apycot 'full' tests, eg running
test with coverage enabled, checking that code coverage is greater
than a given threshold, but also running pylint and checking that
its global evaluation is at least 7 (configurable, of course).
- Katia & Aurélien provided a sharp implementation of recipe checking,
so that we know we don't launch a recipe badly constructed, as well
as informing the user nicely from what errors his recipe suffer.
- Julien managed to set up a recipe managing from Debian package
construction to Debian repository publication, going through lintian
on the way
- Pierre-Yves helped other teams to solve the narval related bugs
they encountered, and finished by writing a thread-safe implementation
of apycot's writer so we can run several checker simultaneously.
- Celso continued working on a proof of concept blue-theme cube,
wondering how to make CubicWeb looks nicer and be easily customisable
in future versions.
- Sylvain helped there and there and integrated patches...
So we finally didn't get up to the demo. But we now have everything to
set it up, so I've a good hope that we will have a beta version of our
brand new production chain up and running before the end of August!
Thanks to everyone for all this good work, and for this time spent all together!
Following the presentation of CubicWeb at OSCON 2010 in July, the editor of SemanticWeb.com wrote an article describing the CubicWeb framwork. Read the article and ask your questions on the mailing list!
In this fourth day of the our Summer Sprint important progress have been made.
- Stéphanie and Alain cleaned up the Apycot's bot sources from deprecated code
and rewrite part of the test suite to follow the new way to launch apycot.
They cleaned up the handling of VCS sources for tested project taking
advantages of the new mercurial cache for vcsfile implemented by Katia and
Aurélien last Tuesday. This feature keep a local clone of the remote
repository and allow much faster checkout during test runs.
- Julien made significant progress in the writing of the Debian recipe. A
recipes can now successfully build Debian packages of a project and validate
them with lintian and lgp. He later paired with Pierre-Yves and they
improved the annotation of Apycot's Narval variable to enhance Input validation in
Apycot's Narval recipes. For example, the action building a Debian package
will explicitly refuse to run on a project not yet checked-out.
- Aurelien first paired with Pierre-Yves to improve some views and the
consistency of the database schema, then he worked on a dashboard
displaying various indicators useful to the version publishing process.
- Pierre-Yves spent some time improving the ability of Narval to recover on
errors and to display meaningful logs about them.
- Alexandre and Charles finished the re-implementation of the full python
recipe.They used options at the Narval level to run test suite with the coverage
enabled and re-enabled the coverage checker to process the result, discovering some
problems in Narval's engine on the way...
- Celso finished Spanish translation of Cubicweb's core and started to work on a
new css theme
- Sylvain helped several groups along the day and reviewed patches from them.
CubicWeb/Narval Sprint is going on !
The third day of our sprint focused on the following points:
- Pierre-Yves worked to prevent duplicate test executions (eg running several time the same test with the same version configuration),
- Celso has terminated the spanish translation of CubicWeb. He's now working on various cubes translation,
- Stéphanie and Alain spent some time on the narval bot view. They also modified ProjectEnvironement's attributes in order to use similar information available on the vcsfile repository, hence simplifying the configuration (more to do on this!),
- Julien worked on the debian package recipe,
- Katia and Aurélien worked on recipe security (using CWPermission),
- Alexandre and Charles produced a first template of a full test recipe using pyunit and pycoverage,
- Finally, our captain, Sylvain, is at the helm !
We'll hopefuly be able to present a functionnal demo at the end of the week.
Narval/Cubicweb left off !
During the second day of our Summer CubicWeb/Narval Sprint, several tasks started on the first day were completed and new tasks started:
- Charles, Alexandre and Julien finished writing the "copy" and "move" Narval actions, and then started transforming existing apycot checkers into Narval actions.
- Pierre-Yves managed to improve Narval reports with more explicit and relevant content.
- Stéphanie and Alain finished the bot status view as well as the recipe graph view.
- Katia and Aurélien finished writing the new mercurial cache solution for vcsfile and started improving the security of Narval recipes (i.e. who can start which recipe).
- Celso kept on his life-long work of translating CubicWeb to Spanish.
- Sylvain wrote some Narval views, improved Narval execution logs handling and kept on reviewing patches and helping various people...
We started this first day by several presentations by Sylvain about Logilab's current development process workflow, and compared it to what it should be after the sprint. Sylvain also introduced Narval.
We then set up a dev environment on everyone's computer: a working forge with a local Narval agent that can be used for tests during the week.
Regarding more concrete tasks:
- Charles and Alexandre started writing some basic Narval actions such as move, to move a file from a place to another, and had to grasp narval's concepts on the way.
- Pierre-Yves dug into the code to understand how exceptions are propagated in the Narval engine, his goal was to get better reports.
- Stéphanie and Alain worked on a nice bot status view.
- Katia, Aurélien studied the new mercurial cache solution for vcsfile
- Julien started some piece of documentation.
- Celso, our Mexican friend, discovered some new features of recent cubicweb releases and setup his environment to later work on Spanish translation, CSS, etc.
- Sylvain came with a basically working narval implementation on top of cubicweb, and spent the day helping various people...
Although this week is normally the regular annual holidays here at Logilab, some of us will sprint in Paris exceptionally.
We're starting this week with an exciting goal: integrating all our release
process into our continuous integration suite (through the apycot cube).
Including Debian repository management, pypi registration, etc...
The hot stuff to achieve this is the third resurrection of Narval, the project
Logilab was originaly based on, but this time it is built on top of
CubicWeb framework. Narval will be used to rewrite
some parts of apycot, in order to make it more flexible and powerful.
It is not just a refactoring or a simple upgrade!
We hope to automate common tasks, simplify maintenance, and thus
enhance release quality, but also gain a lot of functionality in near future.
- merge Apycotbot process manager into a new Narval incarnation, and rewrite
it as Narval actions and recipes
- improve vcsfile cube with a new cache system for mercurial
- define Logilab's release process as new Narval recipes, triggered by actions
such as adding release tag into the source repository
More detailed stuff will come with the sprint reports that we'll try to issue each day.
This sprint is taking place in Logilab's offices in Paris from Monday the 9th to the 13th of August 2010.