Skip to main content

New Releases at plone , releases my sweat !!

Hello everyone!!, in the blog I will share my experience that how things become terrifying if the new version of some product is released in plone. The main problem occurs when we have not pin up the products to the specific versions in the buildouts. Wow!! its a lot much at one shot. Don't worry we will understand each and everything. Lets start..

Plone uses buildouts to make a structure of its code. There are builduts.cfg (Configuration files) to set up plone projects.

What is buildout ?
Buildout is a Python-based build system for creating, assembling and deploying applications from multiple parts, some of which may be non-Python-based. It lets you create a buildout configuration and reproduce the same software later.

So plone uses these buildouts for setups. I have also configured the buildout for my project and things were going great until there is new release for plone 5.0.dev from plone 4.3.6(the previous plone version).

Here is the snippet of buildout.cfg :-
 

What happens when a new version is released ?
When a new version is released, then the buildout tries to extract the code from the latest version of the various products until we have pinned the product to a particular version. Here is the snippet of how to pin the particular product to specific version, I used version.cfg that purpose that have been extended from the base.cfg as you can see in the "[extends]" section of the above snap. Here is the snippet for the versions.cfg :-
 Here we can see that I have specified the version of the products, there are other products also but as we have not pinned them so while we run "./bin/buildout" it will install the latest version of those products.

What is the reason to pin the products ? Lets download the latest version of that product ?
Yeah, its good to keep the latest version of the code, but sometimes there are things that are dependent on the previous versions of the code, like in my case the products CMFPlone's latest version has been released but I have been working on the Plone 4.3.6 so this causes the failure for travis. Actually I have pinned the CMFPlone product to 4.3.6 but there was another product named "plone.app.widget" which has not been pinned in the buildouts and that product "p.a.widget" calls the CMFPlone, so as I have not pinned that product so it always call the latest version of CMFPlone but we need the CMFPlone version 4.3.6 so it creates the test failure for me. Here is the snippet for the travis failure :-
So the main problem was that how to resolve that issue, as I have easily said that there was an error is plone.app.widget as I have not pinned it but in the error log we can see that there is no mention of plone.app.widget as it directly says that "there is a version conflict for CMFPlone", when we see our buildouts we can see that CMFPlone has been pinned to 4.3.6 so if that product is called directly then it should be installed as version 4.3.6 and not as 5.0.dev, but it has been installed as a latest version, so it creates a lot of problem for me to detect the problem and to solve that issue.

How to detect where the problem is ? which product to pin ?
There were two ways either start pinning each product one by one and that will solve our issue, but that is really a terrible and redundant solution, we rather need to find the specific products that have been creating the problem. So with the help of jensens (irc name) , he suggested me the "grep" method. With the help of grep method I tried to find that which products are trying to call the CMFPlone of latest version and I have found that plone.app.widget is the product that has not been pinned yet so buildout has been installing its latest version and it has been calling the latest version of the CMFPlone, which is CMFPlone 5.0.dev.

So finally all this I got the solution of my problem and as I have pinned plone.app.widget in the vesions.cfg , it works and finally travis passed.
Here is the snippet :-

People on irc really helped me on solving that issue, learn a lot from that issue.

Thanks for reading that, hope you enjoy reading that!!

Cheers!!
Happy Coding :)

Comments

Popular posts from this blog

Summarizing Summer

It was a great pleasure to work with great coders/developers at Plone Foundation and learning a lot from them during the course of the program. This blog is about summarizing the whole work I have done during this summer under Google summer of code 2016 under Plone Foundation. So my project mainly focuses on improving forms in plone for dexterity. We already have forms in plone for archetype. So there is a project named collective.easyform which basically provide forms for Plone as dexterity contenttype. The main focus of the project was to improve that code base. Make this stable for plone 5.0 and above. Make all the test cases passing for the code base. Try to cover tests as much as possible code base. Also implement functionalities for fields/actions of the forms in correct place. Make the plone more user friendly. Finally for users who want to migrate their already present forms in Plone Form Gen (PFG) which is archetype to easyforms which are dexterity based forms Plone. This w

One Last Time

Okay. So finally the list of GSOC'16 selected students is out and I am glad that my project got selected under Plone Foundation. I am really looking forward to work on my project which is basically improving the add-on named easyforms. I have already started working on the same project and will plan with my mentor for future work. I will keep this blog updated with the work I will be doing during the project as I did last summer too. Cheers.

The Transform Finally!!

Hello everyone, today I will tell you how I implemented the safe_html transform using lxml library of python. I tried to port the safe_html form CMFDefault dependencies to lxml libraries and tried to install my new transform in place of the old safe_html transform. So when ever our add-on is installed then it will uninstall the safe_html and install our new transoform. So there are a lot of things going on in the mind about lxml, why we use that and all.. So lets explore all these things. What is lxml ? The lxml XML toolkit is a Pythonic binding for the C libraries libxml2 and libxslt. It is unique in that it combines the speed and XML feature completeness of these libraries with the simplicity of a native Python API, mostly compatible but superior to the well-known ElementTree API. Why we need to port the transform to lxml ? Earlier the safe_html transform had the dependencies of CMFDefault and we all are working to make plone free from CMFDefault dependencies as due to CMF