You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Rohit Yadav <ro...@shapeblue.com> on 2014/12/01 09:17:26 UTC

WTF: Difference between schemas across branches?

Hi,

While I’m working to backport changes on 4.3 branch, I discovered some changes between 4.3 branch’s schema-421to431.sql and master branch’s 421to431.sql files. While most changes are inserts/update related which may not severely harm a user upgrading from a previous version of CloudStack, but I found there were changes in the schema itself; in this case the `cloud`.`template_view`:

0e2e6995 setup/db/db/schema-421to430.sql (Nitin Mehta         2014-01-30 17:59:55 -0800  306)         `cloud`.`template_store_ref` ON template_store_ref.template_id = vm_template.id and template_store_ref.store_role = 'Image' and template_store_ref.destroyed=0

While on 4.3 branch:
abbae2aa setup/db/db/schema-420to430.sql (Alex Huang          2013-08-26 17:30:58 -0700  306)         `cloud`.`template_store_ref` ON template_store_ref.template_id = vm_template.id and template_store_ref.store_role = ‘Image’


Which version should we keep? Here’s the complete diff: http://pastebin.com/PB6N7aCt

You may do it locally against 4.3 (4.4/4.5 etc.) and master as well:
git diff master 4.3 -- setup/db/db/schema-421to430.sql

I think such issues are seen time and time again due to the way paid contributors work on private forks and upstream ACS. We simply don’t want to use code thrown over corporate fences to ACS branches.

While who am I to tell you how to do your job - I simply request that all of the committers are expected to have some level of commitment to the project and ethics of their contributions. The best way to work together is to work in the upstream first and then work on your forks that is based on the upstream. Hope this will improve with time.

Regards,
Rohit Yadav
Software Architect, ShapeBlue
M. +91 88 262 30892 | rohit.yadav@shapeblue.com
Blog: bhaisaab.org | Twitter: @_bhaisaab

Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build<http://shapeblue.com/iaas-cloud-design-and-build//>
CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
CloudStack Software Engineering<http://shapeblue.com/cloudstack-software-engineering/>
CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/>
CloudStack Bootcamp Training Courses<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is a company registered by The Republic of South Africa and is traded under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Re: WTF: Difference between schemas across branches?

Posted by Daan Hoogland <da...@gmail.com>.
Rohit,

You are quite right to complain about this, as in +1. There was a similar
thing in the 44to45 files between 4.5 and master. Hugo mailed about it and
half of it got resolved! WTF indeed.

mobile dev with bilingual spelling checker used (read at your own risk)
Op 1 dec. 2014 09:18 schreef "Rohit Yadav" <ro...@shapeblue.com>:

> Hi,
>
> While I’m working to backport changes on 4.3 branch, I discovered some
> changes between 4.3 branch’s schema-421to431.sql and master branch’s
> 421to431.sql files. While most changes are inserts/update related which may
> not severely harm a user upgrading from a previous version of CloudStack,
> but I found there were changes in the schema itself; in this case the
> `cloud`.`template_view`:
>
> 0e2e6995 setup/db/db/schema-421to430.sql (Nitin Mehta         2014-01-30
> 17:59:55 -0800  306)         `cloud`.`template_store_ref` ON
> template_store_ref.template_id = vm_template.id and
> template_store_ref.store_role = 'Image' and template_store_ref.destroyed=0
>
> While on 4.3 branch:
> abbae2aa setup/db/db/schema-420to430.sql (Alex Huang          2013-08-26
> 17:30:58 -0700  306)         `cloud`.`template_store_ref` ON
> template_store_ref.template_id = vm_template.id and
> template_store_ref.store_role = ‘Image’
>
>
> Which version should we keep? Here’s the complete diff:
> http://pastebin.com/PB6N7aCt
>
> You may do it locally against 4.3 (4.4/4.5 etc.) and master as well:
> git diff master 4.3 -- setup/db/db/schema-421to430.sql
>
> I think such issues are seen time and time again due to the way paid
> contributors work on private forks and upstream ACS. We simply don’t want
> to use code thrown over corporate fences to ACS branches.
>
> While who am I to tell you how to do your job - I simply request that all
> of the committers are expected to have some level of commitment to the
> project and ethics of their contributions. The best way to work together is
> to work in the upstream first and then work on your forks that is based on
> the upstream. Hope this will improve with time.
>
> Regards,
> Rohit Yadav
> Software Architect, ShapeBlue
> M. +91 88 262 30892 | rohit.yadav@shapeblue.com
> Blog: bhaisaab.org | Twitter: @_bhaisaab
>
> Find out more about ShapeBlue and our range of CloudStack related services
>
> IaaS Cloud Design & Build<
> http://shapeblue.com/iaas-cloud-design-and-build//>
> CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
> CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
> CloudStack Software Engineering<
> http://shapeblue.com/cloudstack-software-engineering/>
> CloudStack Infrastructure Support<
> http://shapeblue.com/cloudstack-infrastructure-support/>
> CloudStack Bootcamp Training Courses<
> http://shapeblue.com/cloudstack-training/>
>
> This email and any attachments to it may be confidential and are intended
> solely for the use of the individual to whom it is addressed. Any views or
> opinions expressed are solely those of the author and do not necessarily
> represent those of Shape Blue Ltd or related companies. If you are not the
> intended recipient of this email, you must neither take any action based
> upon its contents, nor copy or show it to anyone. Please contact the sender
> if you believe you have received this email in error. Shape Blue Ltd is a
> company incorporated in England & Wales. ShapeBlue Services India LLP is a
> company incorporated in India and is operated under license from Shape Blue
> Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil
> and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is
> a company registered by The Republic of South Africa and is traded under
> license from Shape Blue Ltd. ShapeBlue is a registered trademark.
>

Re: WTF: Difference between schemas across branches?

Posted by Daan Hoogland <da...@gmail.com>.
Nitin,

On Tue, Dec 2, 2014 at 6:38 AM, Nitin Mehta <Ni...@citrix.com> wrote:
> The changes from the commit 0e2e6995 are right, but this is not exactly
> schema change but view definition changes.
> This has been fixed in 4.5 through acc9c79 so that any one upgrading to
> 4.5 do not miss these changes. Do note that this change is idempotent so
> even if you do or do not make this change, anyone upgrading to 4.5
> shouldn¹t have an issue, but yes 4.3 do not have these changes.

This is not just a matter of working functionality. It concerns
maintainability of the code base as well. It is assumed in the project
that schema and upgrade files do not change and only forward changes
are added to newer schema- and Upgrade-files. different fies in
different branches mean we are painting ourselves in a corner,
especially if we want to do any sustainable LTS.

>
> Thanks,
> -Nitin
>
> On 01/12/14 1:47 PM, "Rohit Yadav" <ro...@shapeblue.com> wrote:
>
>>Hi,
>>
>>While I¹m working to backport changes on 4.3 branch, I discovered some
>>changes between 4.3 branch¹s schema-421to431.sql and master branch¹s
>>421to431.sql files. While most changes are inserts/update related which
>>may not severely harm a user upgrading from a previous version of
>>CloudStack, but I found there were changes in the schema itself; in this
>>case the `cloud`.`template_view`:
>>
>>0e2e6995 setup/db/db/schema-421to430.sql (Nitin Mehta         2014-01-30
>>17:59:55 -0800  306)         `cloud`.`template_store_ref` ON
>>template_store_ref.template_id = vm_template.id and
>>template_store_ref.store_role = 'Image' and template_store_ref.destroyed=0
>>
>>While on 4.3 branch:
>>abbae2aa setup/db/db/schema-420to430.sql (Alex Huang          2013-08-26
>>17:30:58 -0700  306)         `cloud`.`template_store_ref` ON
>>template_store_ref.template_id = vm_template.id and
>>template_store_ref.store_role = ŒImage¹
>>
>>
>>Which version should we keep? Here¹s the complete diff:
>>http://pastebin.com/PB6N7aCt
>>
>>You may do it locally against 4.3 (4.4/4.5 etc.) and master as well:
>>git diff master 4.3 -- setup/db/db/schema-421to430.sql
>>
>>I think such issues are seen time and time again due to the way paid
>>contributors work on private forks and upstream ACS. We simply don¹t want
>>to use code thrown over corporate fences to ACS branches.
>>
>>While who am I to tell you how to do your job - I simply request that all
>>of the committers are expected to have some level of commitment to the
>>project and ethics of their contributions. The best way to work together
>>is to work in the upstream first and then work on your forks that is
>>based on the upstream. Hope this will improve with time.
>>
>>Regards,
>>Rohit Yadav
>>Software Architect, ShapeBlue
>>M. +91 88 262 30892 | rohit.yadav@shapeblue.com
>>Blog: bhaisaab.org | Twitter: @_bhaisaab
>>
>>Find out more about ShapeBlue and our range of CloudStack related services
>>
>>IaaS Cloud Design &
>>Build<http://shapeblue.com/iaas-cloud-design-and-build//>
>>CSForge ­ rapid IaaS deployment framework<http://shapeblue.com/csforge/>
>>CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
>>CloudStack Software
>>Engineering<http://shapeblue.com/cloudstack-software-engineering/>
>>CloudStack Infrastructure
>>Support<http://shapeblue.com/cloudstack-infrastructure-support/>
>>CloudStack Bootcamp Training
>>Courses<http://shapeblue.com/cloudstack-training/>
>>
>>This email and any attachments to it may be confidential and are intended
>>solely for the use of the individual to whom it is addressed. Any views
>>or opinions expressed are solely those of the author and do not
>>necessarily represent those of Shape Blue Ltd or related companies. If
>>you are not the intended recipient of this email, you must neither take
>>any action based upon its contents, nor copy or show it to anyone. Please
>>contact the sender if you believe you have received this email in error.
>>Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue
>>Services India LLP is a company incorporated in India and is operated
>>under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is
>>a company incorporated in Brasil and is operated under license from Shape
>>Blue Ltd. ShapeBlue SA Pty Ltd is a company registered by The Republic of
>>South Africa and is traded under license from Shape Blue Ltd. ShapeBlue
>>is a registered trademark.
>



-- 
Daan

Re: WTF: Difference between schemas across branches?

Posted by Rohit Yadav <ro...@shapeblue.com>.
Thanks for replying Nitin. I've picked the latest fix, both schema files
are semantically same now.

If we're fixing/back-porting bug-fixes to all branches where a bug
exists and making sure we're not introducing differences in schema, by
doing that in a way we're helping the overall community (and not just
coding) and living the Apache way of community over code.

I think if our day-job allow us to fix then it should *ideally* allow us
to fix a bug on all the affected branches. I noticed recently within the
community that a lot of companies who may provide such ideal
environments are looking for good developers.

Some folks expressed concerns over the email subject. They were all
right, the subject contains a typo that I forgot to remove.

On Tuesday 02 December 2014 11:08 AM, Nitin Mehta wrote:
> The changes from the commit 0e2e6995 are right, but this is not exactly
> schema change but view definition changes.
> This has been fixed in 4.5 through acc9c79 so that any one upgrading to
> 4.5 do not miss these changes. Do note that this change is idempotent so
> even if you do or do not make this change, anyone upgrading to 4.5
> shouldn¹t have an issue, but yes 4.3 do not have these changes.
>
> Thanks,
> -Nitin
>
> On 01/12/14 1:47 PM, "Rohit Yadav" <ro...@shapeblue.com> wrote:
>
>> Hi,
>>
>> While I¹m working to backport changes on 4.3 branch, I discovered some
>> changes between 4.3 branch¹s schema-421to431.sql and master branch¹s
>> 421to431.sql files. While most changes are inserts/update related which
>> may not severely harm a user upgrading from a previous version of
>> CloudStack, but I found there were changes in the schema itself; in this
>> case the `cloud`.`template_view`:
>>
>> 0e2e6995 setup/db/db/schema-421to430.sql (Nitin Mehta         2014-01-30
>> 17:59:55 -0800  306)         `cloud`.`template_store_ref` ON
>> template_store_ref.template_id = vm_template.id and
>> template_store_ref.store_role = 'Image' and template_store_ref.destroyed=0
>>
>> While on 4.3 branch:
>> abbae2aa setup/db/db/schema-420to430.sql (Alex Huang          2013-08-26
>> 17:30:58 -0700  306)         `cloud`.`template_store_ref` ON
>> template_store_ref.template_id = vm_template.id and
>> template_store_ref.store_role = ŒImage¹
>>
>>
>> Which version should we keep? Here¹s the complete diff:
>> http://pastebin.com/PB6N7aCt
>>
>> You may do it locally against 4.3 (4.4/4.5 etc.) and master as well:
>> git diff master 4.3 -- setup/db/db/schema-421to430.sql
>>
>> I think such issues are seen time and time again due to the way paid
>> contributors work on private forks and upstream ACS. We simply don¹t want
>> to use code thrown over corporate fences to ACS branches.
>>
>> While who am I to tell you how to do your job - I simply request that all
>> of the committers are expected to have some level of commitment to the
>> project and ethics of their contributions. The best way to work together
>> is to work in the upstream first and then work on your forks that is
>> based on the upstream. Hope this will improve with time.
>>
>> Regards,
>> Rohit Yadav
>> Software Architect, ShapeBlue
>> M. +91 88 262 30892 | rohit.yadav@shapeblue.com
>> Blog: bhaisaab.org | Twitter: @_bhaisaab

--
Regards,
Rohit Yadav
Software Architect, ShapeBlue
M. +41 779015219 | rohit.yadav@shapeblue.com
Blog: bhaisaab.org | Twitter: @_bhaisaab
Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build<http://shapeblue.com/iaas-cloud-design-and-build//>
CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
CloudStack Software Engineering<http://shapeblue.com/cloudstack-software-engineering/>
CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/>
CloudStack Bootcamp Training Courses<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is a company registered by The Republic of South Africa and is traded under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Re: WTF: Difference between schemas across branches?

Posted by Nitin Mehta <Ni...@citrix.com>.
The changes from the commit 0e2e6995 are right, but this is not exactly
schema change but view definition changes.
This has been fixed in 4.5 through acc9c79 so that any one upgrading to
4.5 do not miss these changes. Do note that this change is idempotent so
even if you do or do not make this change, anyone upgrading to 4.5
shouldn¹t have an issue, but yes 4.3 do not have these changes.

Thanks,
-Nitin

On 01/12/14 1:47 PM, "Rohit Yadav" <ro...@shapeblue.com> wrote:

>Hi,
>
>While I¹m working to backport changes on 4.3 branch, I discovered some
>changes between 4.3 branch¹s schema-421to431.sql and master branch¹s
>421to431.sql files. While most changes are inserts/update related which
>may not severely harm a user upgrading from a previous version of
>CloudStack, but I found there were changes in the schema itself; in this
>case the `cloud`.`template_view`:
>
>0e2e6995 setup/db/db/schema-421to430.sql (Nitin Mehta         2014-01-30
>17:59:55 -0800  306)         `cloud`.`template_store_ref` ON
>template_store_ref.template_id = vm_template.id and
>template_store_ref.store_role = 'Image' and template_store_ref.destroyed=0
>
>While on 4.3 branch:
>abbae2aa setup/db/db/schema-420to430.sql (Alex Huang          2013-08-26
>17:30:58 -0700  306)         `cloud`.`template_store_ref` ON
>template_store_ref.template_id = vm_template.id and
>template_store_ref.store_role = ŒImage¹
>
>
>Which version should we keep? Here¹s the complete diff:
>http://pastebin.com/PB6N7aCt
>
>You may do it locally against 4.3 (4.4/4.5 etc.) and master as well:
>git diff master 4.3 -- setup/db/db/schema-421to430.sql
>
>I think such issues are seen time and time again due to the way paid
>contributors work on private forks and upstream ACS. We simply don¹t want
>to use code thrown over corporate fences to ACS branches.
>
>While who am I to tell you how to do your job - I simply request that all
>of the committers are expected to have some level of commitment to the
>project and ethics of their contributions. The best way to work together
>is to work in the upstream first and then work on your forks that is
>based on the upstream. Hope this will improve with time.
>
>Regards,
>Rohit Yadav
>Software Architect, ShapeBlue
>M. +91 88 262 30892 | rohit.yadav@shapeblue.com
>Blog: bhaisaab.org | Twitter: @_bhaisaab
>
>Find out more about ShapeBlue and our range of CloudStack related services
>
>IaaS Cloud Design &
>Build<http://shapeblue.com/iaas-cloud-design-and-build//>
>CSForge ­ rapid IaaS deployment framework<http://shapeblue.com/csforge/>
>CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
>CloudStack Software
>Engineering<http://shapeblue.com/cloudstack-software-engineering/>
>CloudStack Infrastructure
>Support<http://shapeblue.com/cloudstack-infrastructure-support/>
>CloudStack Bootcamp Training
>Courses<http://shapeblue.com/cloudstack-training/>
>
>This email and any attachments to it may be confidential and are intended
>solely for the use of the individual to whom it is addressed. Any views
>or opinions expressed are solely those of the author and do not
>necessarily represent those of Shape Blue Ltd or related companies. If
>you are not the intended recipient of this email, you must neither take
>any action based upon its contents, nor copy or show it to anyone. Please
>contact the sender if you believe you have received this email in error.
>Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue
>Services India LLP is a company incorporated in India and is operated
>under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is
>a company incorporated in Brasil and is operated under license from Shape
>Blue Ltd. ShapeBlue SA Pty Ltd is a company registered by The Republic of
>South Africa and is traded under license from Shape Blue Ltd. ShapeBlue
>is a registered trademark.