← Back to team overview

openstack team mailing list archive

Re: best practices for merging common into specific projects

 

Interestingly enough - gerrit supports submodules pretty well... and it
does exactly what Eric said below ... if both the project and
superproject are in gerrit, and a change is made to the project, gerrit
can automatically update the superproject reference.

Here's the thing though (and one of the reasons we haven't actually
earnestly suggested using this for anything yet) ... testing

If you propose a change to openstack-common and we were going to use the
auto-update feature, we'd need to test that that change doesn't break
ALL of the projects that use it. Now, what if nova is going to need a
patch to use the new version of the code. Oops. Complexity. Overload.
Everyone dies.

However, with a versioned library model, the projects can consume things
pinned to specific versions, and then they can submit a change that
updates the version depend and the code which needs to be updated to
support the version change, and that change can be atomic.

So honestly, I'd say the real key is getting us closer to the point
where openstack-common is a proper library, because all of the rest of
the complexity is stuff we're inventing to make life harder on
ourselves, when the standard library with api-contract and a version
model of the world works pretty fine without needing coordinated changes
across multiple repositories.

On 07/03/2012 06:54 PM, Gabriel Hurley wrote:
> I’m pretty -1 on triggering changes in other projects from common.
> That’s gonna result in a broken code (whether subtle or obvious) no
> matter how good your gates are.
> 
>  
> 
> At least as an external library you can freeze a version requirement
> until such time as you see fit to properly updated that code and
> **ensure** compatibility in your project.
> 
>  
> 
> Or if your project likes ridin’ trunk, then don’t pin a version and
> you’ve got the same effect as an automatic trigger.
> 
>  
> 
> -          Gabriel
> 
>  
> 
> *From:*openstack-bounces+gabriel.hurley=nebula.com@xxxxxxxxxxxxxxxxxxx
> [mailto:openstack-bounces+gabriel.hurley=nebula.com@xxxxxxxxxxxxxxxxxxx]
> *On Behalf Of *Andrew Bogott
> *Sent:* Tuesday, July 03, 2012 3:54 PM
> *To:* Eric Windisch; openstack@xxxxxxxxxxxxxxxxxxx
> *Subject:* Re: [Openstack] best practices for merging common into
> specific projects
> 
>  
> 
> On 7/3/12 5:47 PM, Eric Windisch wrote:
> 
> git submodules don't have to be linked to the head of a branch. Instead
> of double-commiting (for every commit), we can do a single commit in
> each project to change the git reference of the submodule. This would
> not be too far from the existing behavior, except that it would minimize
> the double commits.
> 
>  
> 
> Oh, I guess I left out an important part of my vision, which is that
> there would be a commit hook in common which moves the submodule
> reference in the parent projects anytime a patch is merged in common. 
> So, in short: once a patch passed review for inclusion in common, that
> patch would automatically go live in all other project heads simultaneously.
> 
> 
> -- 
> Eric Windisch
> 
>  
> 
> On Tuesday, July 3, 2012 at 15:47 PM, Andrew Bogott wrote:
> 
>     On 7/3/12 1:59 PM, Gabriel Hurley wrote:
> 
>         The notion that copying code is any protection against APIs that
>         may change is a red herring. It's the exact same effect as
>         pegging a version of a dependency (whether it's a commit hash or
>         a real version number), except now you have code duplication. An
>         unstable upgrade path is an unstable upgrade path, and copying
>         the code into the project doesn't alleviate the pain for the
>         project if the upstream library decides to change its APIs.
> 
>          
> 
>         Also, we're really calling something used by more or less all
>         the core projects "incubated"? ;-) Seems like it's past the
>         proof-of-concept phase now, at least for many parts of common.
>         Questions of API stability are an issue unto themselves.
> 
>          
> 
>         Anyhow, I'm +1 on turning it into a real library of its own, as
>         a couple people suggested already.
> 
>          
> 
>         - Gabriel
> 
>      
> 
>     I feel like I should speak up since I started this fight in the first
> 
>     place :)
> 
>      
> 
>     Like most people in this thread, I too long for an end to the weird
> 
>     double-commit process that we're using now. So I'm happy to set aside
> 
>     my original Best Practices proposal until there's some consensus
> 
>     regarding how much longer we're going to use that process. Presumably
> 
>     opinions about how to handle merge-from-common commits will vary in the
> 
>     meantime, but that's something we can live with.
> 
>      
> 
>     In terms of promoting common into a real project, though, I want to
> 
>     raise another option that's guaranteed to be unpopular: We make
> 
>     openstack-common a git-submodule that is automatically checked out
> 
>     within the directory tree of each other project. Then each commit to
> 
>     common would need to be gated by the full set of tests on every project
> 
>     that includes common.
> 
>      
> 
>     I haven't thought deeply about the pros and cons of code submodule vs.
> 
>     python project, but I want to bring up the option because it's the
> 
>     system that I'm the most familiar with, and one that's been discussed a
> 
>     bit off and on.
> 
>      
> 
>     -Andrew
> 
>      
> 
>     _______________________________________________
> 
>     Mailing list: https://launchpad.net/~openstack
>     <https://launchpad.net/%7Eopenstack>
> 
>     Post to : openstack@xxxxxxxxxxxxxxxxxxx
>     <mailto:openstack@xxxxxxxxxxxxxxxxxxx>
> 
>     Unsubscribe : https://launchpad.net/~openstack
>     <https://launchpad.net/%7Eopenstack>
> 
>     More help : https://help.launchpad.net/ListHelp
> 
>  
> 
>  
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
> 



Follow ups

References