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 :)
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 :-
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 :-
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
Post a Comment