You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Chip Childers <ch...@sungard.com> on 2012/07/31 22:52:29 UTC

Official ASF process for re-writing code?

Does anyone know the official ASF stance on what it means to
"re-write" a section of code?

Specifically, I was looking at the F5 code [1] that was found during
license header changes (and is considered a release blocker bug [2]).
The code is actually quite trivial in nature, and I'm wondering what
it would take to correctly write a replacement class file.  My
assumption is that simply re-naming variables wouldn't work (and even
if that was enough, there are only a handful of them in the file).

Guidance from Citrix folks that might have had discussions with ASF
legal on this already, or from the project mentors.

Thanks!

-chip

[1] - https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;a=blob;f=core/src/com/cloud/network/resource/XTrustProvider.java
[2] - http://bugs.cloudstack.org/browse/CS-15732

RE: Official ASF process for re-writing code?

Posted by Hugo Trippaers <HT...@schubergphilis.com>.
Hey Chip,

Just pushed the commit that removes the XTrustProvider (https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;a=commit;h=dd6fd2b68df95feb4f7f7f9bbbed1086997dc765)

I tested this against our F5 and the CloudStack code will still happily connect using SSL with the changed code.

Testing done:
	clean-all build-all
	Add F5 loadbalancer using UI

Cheers,

Hugo

-----Original Message-----
From: Chip Childers [mailto:chip.childers@sungard.com] 
Sent: Monday, August 06, 2012 3:10 PM
To: cloudstack-dev@incubator.apache.org
Subject: Re: Official ASF process for re-writing code?

On Mon, Aug 6, 2012 at 4:50 AM, Hugo Trippaers <HT...@schubergphilis.com> wrote:
> Heya ,
>
> I've been looking into this. The XTrustProvider class is also part of the cloud-iControl.jar. Where do we get the jar from?
>
> So far I've not yet been able to get the library to throw certificate validation errors even when disabling the line in configure with the XTrustProvider. Digging into this, it's because the Interfaces class in the iControl jar also calls  XTrustProvider.install().
>
> In any case we can remove the XTtrustProvider from "our" sources and remove the line from configure in F5BigIpResource.
>
> Would that satisfy the license stuff?
>
> Cheers,
>
> Hugo

I think that would satisfy the source code licensing issue (and allow us to close the bug).  The cloud-iControl.jar file is an issue, but other threads are about working through the binary dependencies.

If we can remove the XTrustProvider source file, that would be a good step forward.

-chip

Re: Official ASF process for re-writing code?

Posted by Chip Childers <ch...@sungard.com>.
On Mon, Aug 6, 2012 at 4:50 AM, Hugo Trippaers
<HT...@schubergphilis.com> wrote:
> Heya ,
>
> I've been looking into this. The XTrustProvider class is also part of the cloud-iControl.jar. Where do we get the jar from?
>
> So far I've not yet been able to get the library to throw certificate validation errors even when disabling the line in configure with the XTrustProvider. Digging into this, it's because the Interfaces class in the iControl jar also calls  XTrustProvider.install().
>
> In any case we can remove the XTtrustProvider from "our" sources and remove the line from configure in F5BigIpResource.
>
> Would that satisfy the license stuff?
>
> Cheers,
>
> Hugo

I think that would satisfy the source code licensing issue (and allow
us to close the bug).  The cloud-iControl.jar file is an issue, but
other threads are about working through the binary dependencies.

If we can remove the XTrustProvider source file, that would be a good
step forward.

-chip

RE: Official ASF process for re-writing code?

Posted by Hugo Trippaers <HT...@schubergphilis.com>.
Heya ,

I've been looking into this. The XTrustProvider class is also part of the cloud-iControl.jar. Where do we get the jar from? 

So far I've not yet been able to get the library to throw certificate validation errors even when disabling the line in configure with the XTrustProvider. Digging into this, it's because the Interfaces class in the iControl jar also calls  XTrustProvider.install().

In any case we can remove the XTtrustProvider from "our" sources and remove the line from configure in F5BigIpResource.

Would that satisfy the license stuff?

Cheers,

Hugo


-----Original Message-----
From: Chip Childers [mailto:chip.childers@sungard.com] 
Sent: Saturday, August 04, 2012 8:51 PM
To: <cl...@incubator.apache.org>
Subject: Re: Official ASF process for re-writing code?

Very cool. Thanks Hugo!

- chip

Sent from my iPhone.

On Aug 3, 2012, at 1:27 PM, Hugo Trippaers <HT...@schubergphilis.com> wrote:

> Hey Chip,
>
> Sure, happy to help out. I can probably get something done this weekend. Having this as a generic class could be a benefit for future integrations as well.
>
> I'll dive in to the code and keep track of this thread to see if I can help out.
>
>
> Cheers,
>
> Hugo
>
> Sent from my iPhone
>
> On 3 aug. 2012, at 19:21, "Chip Childers" <ch...@sungard.com> wrote:
>
>> Hugo,
>>
>> Just looked at your implementation.  It does appear to do the same 
>> thing, which is fantastic.  Would you happen to have any availability 
>> to attempt to replace the F5 code with something similar to your 
>> implementation?  Perhaps it should be a utility class that can be 
>> shared between the two features?
>>
>> Kishan has CS-15732 currently assigned to him (the bug for tracking 
>> this), but I haven't heard anything about progress.
>>
>> Kishan - if you've actually started already, can you please let the list know?
>>
>> -chip
>>
>>
>> On Fri, Aug 3, 2012 at 12:57 PM, Hugo Trippaers 
>> <HT...@schubergphilis.com> wrote:
>>> Heya,
>>>
>>> Just pitching in without context, but I have some code in the Nicira stuff that does that, provided the code uses httpclient in the back.
>>>
>>> Cheers,
>>>
>>> Hugo
>>>
>>> Sent from my iPhone
>>>
>>> On 3 aug. 2012, at 13:02, "Arve Paalsrud" <Ar...@bayonette.no> wrote:
>>>
>>>> I have not been able to get a response from Jacob Gilley through a few channels, so we should move forward replacing the XTrustProvider class. It's not too big of a deal and shouldn't take long, but there are really not that many ways to do it. The task is pretty much to accept any SSL certificates, regardless if they are self-signed or from a root cert. I can't see that it will require any special refactoring of the callers either.
>>>>
>>>> For further information of the source: 
>>>> https://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/
>>>> 51/aft/2279/showtab/groupforums/Default.aspx
>>>>
>>>> -Arve
>>>>
>>>> -----Original Message-----
>>>> From: Chip Childers
>>>> Sent: 1. august 2012 03:25
>>>> Subject: Re: Official ASF process for re-writing code?
>>>>
>>>> Fantastic Arve!  Thanks for pitching in.
>>>>
>>>> -chip
>>>>
>>>>
>>>> On Tue, Jul 31, 2012 at 9:13 PM, Arve Paalsrud <Ar...@bayonette.no> wrote:
>>>>> This code snippet is written by Jacob Gilley in a forum thread over at F5 Dev Central in 2005, and not F5 Network themselves. F5's version and the original code are identical - they've only added the copyright statements and optional GPL, so I've reached out to Jacob and asked if he's willing to release it under Apache.
>>>>>
>>>>> Waiting for his reply.
>>>>>
>>>>> -Arve
>>>>>
>>>>> -----Original Message-----
>>>>> From: Adrian Cole [mailto:ferncam1@gmail.com]
>>>>> Sent: 1. august 2012 02:57
>>>>> To: cloudstack-dev@incubator.apache.org
>>>>> Subject: Re: Official ASF process for re-writing code?
>>>>>
>>>>> +1 (non-binding and certainly not official) for taking the 
>>>>> +opportunity to
>>>>> rewrite code as a chance to make things better, vs least efforts.
>>>>>
>>>>> Code written more than several months prior can often be written better anyway (one hopes their skills age well :P).  Particularly, unit tests are a welcome great improvement whenever there's code to be "rewritten".  I'd go so far as to say code without unit tests are often time bombs that should be rewritten anyway.
>>>>>
>>>>> -A
>>>>>
>>>>>
>>>>> On Tue, Jul 31, 2012 at 5:46 PM, Brett Porter <br...@apache.org> wrote:
>>>>>
>>>>>> On 01/08/2012, at 6:52 AM, Chip Childers 
>>>>>> <ch...@sungard.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Does anyone know the official ASF stance on what it means to 
>>>>>>> "re-write" a section of code?
>>>>>>
>>>>>> There's no general answer to this - each case needs to be 
>>>>>> considered separately. This was the closest I could find in the archives:
>>>>>> http://s.apache.org/rewriting-code
>>>>>>
>>>>>>>
>>>>>>> Specifically, I was looking at the F5 code [1] that was found 
>>>>>>> during license header changes (and is considered a release blocker bug [2]).
>>>>>>> The code is actually quite trivial in nature, and I'm wondering 
>>>>>>> what it would take to correctly write a replacement class file.  
>>>>>>> My assumption is that simply re-naming variables wouldn't work 
>>>>>>> (and even if that was enough, there are only a handful of them in the file).
>>>>>>
>>>>>> I agree, renaming variables is definitely not right.
>>>>>>
>>>>>> In this case it is trivial (I googled and found a half-dozen 
>>>>>> examples doing the same thing), so I'd say remove it and have 
>>>>>> someone reimplement it. It may be better in these cases if they 
>>>>>> haven't seen the original code, but not strictly necessary. It is 
>>>>>> probably a good opportunity to refactor calling code too, if needed.
>>>>>>
>>>>>> In other cases, an option available is to ask the copyright 
>>>>>> holder if they'd consider contributing/granting a license to a 
>>>>>> piece of code to include here.
>>>>>>
>>>>>> Ultimately, we want to make sure we do the right thing by the 
>>>>>> authors and that code here is intentionally contributed.
>>>>>>
>>>>>> HTH,
>>>>>> Brett
>>>>>>
>>>>>> --
>>>>>> Brett Porter
>>>>>> brett@apache.org
>>>>>> http://brettporter.wordpress.com/ 
>>>>>> http://au.linkedin.com/in/brettporter
>>>>>> http://twitter.com/brettporter
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
>

Re: Official ASF process for re-writing code?

Posted by Chip Childers <ch...@sungard.com>.
Very cool. Thanks Hugo!

- chip

Sent from my iPhone.

On Aug 3, 2012, at 1:27 PM, Hugo Trippaers
<HT...@schubergphilis.com> wrote:

> Hey Chip,
>
> Sure, happy to help out. I can probably get something done this weekend. Having this as a generic class could be a benefit for future integrations as well.
>
> I'll dive in to the code and keep track of this thread to see if I can help out.
>
>
> Cheers,
>
> Hugo
>
> Sent from my iPhone
>
> On 3 aug. 2012, at 19:21, "Chip Childers" <ch...@sungard.com> wrote:
>
>> Hugo,
>>
>> Just looked at your implementation.  It does appear to do the same
>> thing, which is fantastic.  Would you happen to have any availability
>> to attempt to replace the F5 code with something similar to your
>> implementation?  Perhaps it should be a utility class that can be
>> shared between the two features?
>>
>> Kishan has CS-15732 currently assigned to him (the bug for tracking
>> this), but I haven't heard anything about progress.
>>
>> Kishan - if you've actually started already, can you please let the list know?
>>
>> -chip
>>
>>
>> On Fri, Aug 3, 2012 at 12:57 PM, Hugo Trippaers
>> <HT...@schubergphilis.com> wrote:
>>> Heya,
>>>
>>> Just pitching in without context, but I have some code in the Nicira stuff that does that, provided the code uses httpclient in the back.
>>>
>>> Cheers,
>>>
>>> Hugo
>>>
>>> Sent from my iPhone
>>>
>>> On 3 aug. 2012, at 13:02, "Arve Paalsrud" <Ar...@bayonette.no> wrote:
>>>
>>>> I have not been able to get a response from Jacob Gilley through a few channels, so we should move forward replacing the XTrustProvider class. It's not too big of a deal and shouldn't take long, but there are really not that many ways to do it. The task is pretty much to accept any SSL certificates, regardless if they are self-signed or from a root cert. I can't see that it will require any special refactoring of the callers either.
>>>>
>>>> For further information of the source: https://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/51/aft/2279/showtab/groupforums/Default.aspx
>>>>
>>>> -Arve
>>>>
>>>> -----Original Message-----
>>>> From: Chip Childers
>>>> Sent: 1. august 2012 03:25
>>>> Subject: Re: Official ASF process for re-writing code?
>>>>
>>>> Fantastic Arve!  Thanks for pitching in.
>>>>
>>>> -chip
>>>>
>>>>
>>>> On Tue, Jul 31, 2012 at 9:13 PM, Arve Paalsrud <Ar...@bayonette.no> wrote:
>>>>> This code snippet is written by Jacob Gilley in a forum thread over at F5 Dev Central in 2005, and not F5 Network themselves. F5's version and the original code are identical - they've only added the copyright statements and optional GPL, so I've reached out to Jacob and asked if he's willing to release it under Apache.
>>>>>
>>>>> Waiting for his reply.
>>>>>
>>>>> -Arve
>>>>>
>>>>> -----Original Message-----
>>>>> From: Adrian Cole [mailto:ferncam1@gmail.com]
>>>>> Sent: 1. august 2012 02:57
>>>>> To: cloudstack-dev@incubator.apache.org
>>>>> Subject: Re: Official ASF process for re-writing code?
>>>>>
>>>>> +1 (non-binding and certainly not official) for taking the opportunity
>>>>> +to
>>>>> rewrite code as a chance to make things better, vs least efforts.
>>>>>
>>>>> Code written more than several months prior can often be written better anyway (one hopes their skills age well :P).  Particularly, unit tests are a welcome great improvement whenever there's code to be "rewritten".  I'd go so far as to say code without unit tests are often time bombs that should be rewritten anyway.
>>>>>
>>>>> -A
>>>>>
>>>>>
>>>>> On Tue, Jul 31, 2012 at 5:46 PM, Brett Porter <br...@apache.org> wrote:
>>>>>
>>>>>> On 01/08/2012, at 6:52 AM, Chip Childers <ch...@sungard.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Does anyone know the official ASF stance on what it means to
>>>>>>> "re-write" a section of code?
>>>>>>
>>>>>> There's no general answer to this - each case needs to be considered
>>>>>> separately. This was the closest I could find in the archives:
>>>>>> http://s.apache.org/rewriting-code
>>>>>>
>>>>>>>
>>>>>>> Specifically, I was looking at the F5 code [1] that was found
>>>>>>> during license header changes (and is considered a release blocker bug [2]).
>>>>>>> The code is actually quite trivial in nature, and I'm wondering
>>>>>>> what it would take to correctly write a replacement class file.  My
>>>>>>> assumption is that simply re-naming variables wouldn't work (and
>>>>>>> even if that was enough, there are only a handful of them in the file).
>>>>>>
>>>>>> I agree, renaming variables is definitely not right.
>>>>>>
>>>>>> In this case it is trivial (I googled and found a half-dozen examples
>>>>>> doing the same thing), so I'd say remove it and have someone
>>>>>> reimplement it. It may be better in these cases if they haven't seen
>>>>>> the original code, but not strictly necessary. It is probably a good
>>>>>> opportunity to refactor calling code too, if needed.
>>>>>>
>>>>>> In other cases, an option available is to ask the copyright holder if
>>>>>> they'd consider contributing/granting a license to a piece of code to
>>>>>> include here.
>>>>>>
>>>>>> Ultimately, we want to make sure we do the right thing by the authors
>>>>>> and that code here is intentionally contributed.
>>>>>>
>>>>>> HTH,
>>>>>> Brett
>>>>>>
>>>>>> --
>>>>>> Brett Porter
>>>>>> brett@apache.org
>>>>>> http://brettporter.wordpress.com/
>>>>>> http://au.linkedin.com/in/brettporter
>>>>>> http://twitter.com/brettporter
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
>

Re: Official ASF process for re-writing code?

Posted by Hugo Trippaers <HT...@schubergphilis.com>.
Hey Chip,

Sure, happy to help out. I can probably get something done this weekend. Having this as a generic class could be a benefit for future integrations as well.

I'll dive in to the code and keep track of this thread to see if I can help out.


Cheers,

Hugo

Sent from my iPhone

On 3 aug. 2012, at 19:21, "Chip Childers" <ch...@sungard.com> wrote:

> Hugo,
> 
> Just looked at your implementation.  It does appear to do the same
> thing, which is fantastic.  Would you happen to have any availability
> to attempt to replace the F5 code with something similar to your
> implementation?  Perhaps it should be a utility class that can be
> shared between the two features?
> 
> Kishan has CS-15732 currently assigned to him (the bug for tracking
> this), but I haven't heard anything about progress.
> 
> Kishan - if you've actually started already, can you please let the list know?
> 
> -chip
> 
> 
> On Fri, Aug 3, 2012 at 12:57 PM, Hugo Trippaers
> <HT...@schubergphilis.com> wrote:
>> Heya,
>> 
>> Just pitching in without context, but I have some code in the Nicira stuff that does that, provided the code uses httpclient in the back.
>> 
>> Cheers,
>> 
>> Hugo
>> 
>> Sent from my iPhone
>> 
>> On 3 aug. 2012, at 13:02, "Arve Paalsrud" <Ar...@bayonette.no> wrote:
>> 
>>> I have not been able to get a response from Jacob Gilley through a few channels, so we should move forward replacing the XTrustProvider class. It's not too big of a deal and shouldn't take long, but there are really not that many ways to do it. The task is pretty much to accept any SSL certificates, regardless if they are self-signed or from a root cert. I can't see that it will require any special refactoring of the callers either.
>>> 
>>> For further information of the source: https://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/51/aft/2279/showtab/groupforums/Default.aspx
>>> 
>>> -Arve
>>> 
>>> -----Original Message-----
>>> From: Chip Childers
>>> Sent: 1. august 2012 03:25
>>> Subject: Re: Official ASF process for re-writing code?
>>> 
>>> Fantastic Arve!  Thanks for pitching in.
>>> 
>>> -chip
>>> 
>>> 
>>> On Tue, Jul 31, 2012 at 9:13 PM, Arve Paalsrud <Ar...@bayonette.no> wrote:
>>>> This code snippet is written by Jacob Gilley in a forum thread over at F5 Dev Central in 2005, and not F5 Network themselves. F5's version and the original code are identical - they've only added the copyright statements and optional GPL, so I've reached out to Jacob and asked if he's willing to release it under Apache.
>>>> 
>>>> Waiting for his reply.
>>>> 
>>>> -Arve
>>>> 
>>>> -----Original Message-----
>>>> From: Adrian Cole [mailto:ferncam1@gmail.com]
>>>> Sent: 1. august 2012 02:57
>>>> To: cloudstack-dev@incubator.apache.org
>>>> Subject: Re: Official ASF process for re-writing code?
>>>> 
>>>> +1 (non-binding and certainly not official) for taking the opportunity
>>>> +to
>>>> rewrite code as a chance to make things better, vs least efforts.
>>>> 
>>>> Code written more than several months prior can often be written better anyway (one hopes their skills age well :P).  Particularly, unit tests are a welcome great improvement whenever there's code to be "rewritten".  I'd go so far as to say code without unit tests are often time bombs that should be rewritten anyway.
>>>> 
>>>> -A
>>>> 
>>>> 
>>>> On Tue, Jul 31, 2012 at 5:46 PM, Brett Porter <br...@apache.org> wrote:
>>>> 
>>>>> On 01/08/2012, at 6:52 AM, Chip Childers <ch...@sungard.com>
>>>>> wrote:
>>>>> 
>>>>>> Does anyone know the official ASF stance on what it means to
>>>>>> "re-write" a section of code?
>>>>> 
>>>>> There's no general answer to this - each case needs to be considered
>>>>> separately. This was the closest I could find in the archives:
>>>>> http://s.apache.org/rewriting-code
>>>>> 
>>>>>> 
>>>>>> Specifically, I was looking at the F5 code [1] that was found
>>>>>> during license header changes (and is considered a release blocker bug [2]).
>>>>>> The code is actually quite trivial in nature, and I'm wondering
>>>>>> what it would take to correctly write a replacement class file.  My
>>>>>> assumption is that simply re-naming variables wouldn't work (and
>>>>>> even if that was enough, there are only a handful of them in the file).
>>>>> 
>>>>> I agree, renaming variables is definitely not right.
>>>>> 
>>>>> In this case it is trivial (I googled and found a half-dozen examples
>>>>> doing the same thing), so I'd say remove it and have someone
>>>>> reimplement it. It may be better in these cases if they haven't seen
>>>>> the original code, but not strictly necessary. It is probably a good
>>>>> opportunity to refactor calling code too, if needed.
>>>>> 
>>>>> In other cases, an option available is to ask the copyright holder if
>>>>> they'd consider contributing/granting a license to a piece of code to
>>>>> include here.
>>>>> 
>>>>> Ultimately, we want to make sure we do the right thing by the authors
>>>>> and that code here is intentionally contributed.
>>>>> 
>>>>> HTH,
>>>>> Brett
>>>>> 
>>>>> --
>>>>> Brett Porter
>>>>> brett@apache.org
>>>>> http://brettporter.wordpress.com/
>>>>> http://au.linkedin.com/in/brettporter
>>>>> http://twitter.com/brettporter
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>> 
>> 

Re: Official ASF process for re-writing code?

Posted by Chip Childers <ch...@sungard.com>.
Hugo,

Just looked at your implementation.  It does appear to do the same
thing, which is fantastic.  Would you happen to have any availability
to attempt to replace the F5 code with something similar to your
implementation?  Perhaps it should be a utility class that can be
shared between the two features?

Kishan has CS-15732 currently assigned to him (the bug for tracking
this), but I haven't heard anything about progress.

Kishan - if you've actually started already, can you please let the list know?

-chip


On Fri, Aug 3, 2012 at 12:57 PM, Hugo Trippaers
<HT...@schubergphilis.com> wrote:
> Heya,
>
> Just pitching in without context, but I have some code in the Nicira stuff that does that, provided the code uses httpclient in the back.
>
> Cheers,
>
> Hugo
>
> Sent from my iPhone
>
> On 3 aug. 2012, at 13:02, "Arve Paalsrud" <Ar...@bayonette.no> wrote:
>
>> I have not been able to get a response from Jacob Gilley through a few channels, so we should move forward replacing the XTrustProvider class. It's not too big of a deal and shouldn't take long, but there are really not that many ways to do it. The task is pretty much to accept any SSL certificates, regardless if they are self-signed or from a root cert. I can't see that it will require any special refactoring of the callers either.
>>
>> For further information of the source: https://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/51/aft/2279/showtab/groupforums/Default.aspx
>>
>> -Arve
>>
>> -----Original Message-----
>> From: Chip Childers
>> Sent: 1. august 2012 03:25
>> Subject: Re: Official ASF process for re-writing code?
>>
>> Fantastic Arve!  Thanks for pitching in.
>>
>> -chip
>>
>>
>> On Tue, Jul 31, 2012 at 9:13 PM, Arve Paalsrud <Ar...@bayonette.no> wrote:
>>> This code snippet is written by Jacob Gilley in a forum thread over at F5 Dev Central in 2005, and not F5 Network themselves. F5's version and the original code are identical - they've only added the copyright statements and optional GPL, so I've reached out to Jacob and asked if he's willing to release it under Apache.
>>>
>>> Waiting for his reply.
>>>
>>> -Arve
>>>
>>> -----Original Message-----
>>> From: Adrian Cole [mailto:ferncam1@gmail.com]
>>> Sent: 1. august 2012 02:57
>>> To: cloudstack-dev@incubator.apache.org
>>> Subject: Re: Official ASF process for re-writing code?
>>>
>>> +1 (non-binding and certainly not official) for taking the opportunity
>>> +to
>>> rewrite code as a chance to make things better, vs least efforts.
>>>
>>> Code written more than several months prior can often be written better anyway (one hopes their skills age well :P).  Particularly, unit tests are a welcome great improvement whenever there's code to be "rewritten".  I'd go so far as to say code without unit tests are often time bombs that should be rewritten anyway.
>>>
>>> -A
>>>
>>>
>>> On Tue, Jul 31, 2012 at 5:46 PM, Brett Porter <br...@apache.org> wrote:
>>>
>>>> On 01/08/2012, at 6:52 AM, Chip Childers <ch...@sungard.com>
>>>> wrote:
>>>>
>>>>> Does anyone know the official ASF stance on what it means to
>>>>> "re-write" a section of code?
>>>>
>>>> There's no general answer to this - each case needs to be considered
>>>> separately. This was the closest I could find in the archives:
>>>> http://s.apache.org/rewriting-code
>>>>
>>>>>
>>>>> Specifically, I was looking at the F5 code [1] that was found
>>>>> during license header changes (and is considered a release blocker bug [2]).
>>>>> The code is actually quite trivial in nature, and I'm wondering
>>>>> what it would take to correctly write a replacement class file.  My
>>>>> assumption is that simply re-naming variables wouldn't work (and
>>>>> even if that was enough, there are only a handful of them in the file).
>>>>
>>>> I agree, renaming variables is definitely not right.
>>>>
>>>> In this case it is trivial (I googled and found a half-dozen examples
>>>> doing the same thing), so I'd say remove it and have someone
>>>> reimplement it. It may be better in these cases if they haven't seen
>>>> the original code, but not strictly necessary. It is probably a good
>>>> opportunity to refactor calling code too, if needed.
>>>>
>>>> In other cases, an option available is to ask the copyright holder if
>>>> they'd consider contributing/granting a license to a piece of code to
>>>> include here.
>>>>
>>>> Ultimately, we want to make sure we do the right thing by the authors
>>>> and that code here is intentionally contributed.
>>>>
>>>> HTH,
>>>> Brett
>>>>
>>>> --
>>>> Brett Porter
>>>> brett@apache.org
>>>> http://brettporter.wordpress.com/
>>>> http://au.linkedin.com/in/brettporter
>>>> http://twitter.com/brettporter
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>

Re: Official ASF process for re-writing code?

Posted by Hugo Trippaers <HT...@schubergphilis.com>.
Heya,

Just pitching in without context, but I have some code in the Nicira stuff that does that, provided the code uses httpclient in the back.

Cheers,

Hugo 

Sent from my iPhone

On 3 aug. 2012, at 13:02, "Arve Paalsrud" <Ar...@bayonette.no> wrote:

> I have not been able to get a response from Jacob Gilley through a few channels, so we should move forward replacing the XTrustProvider class. It's not too big of a deal and shouldn't take long, but there are really not that many ways to do it. The task is pretty much to accept any SSL certificates, regardless if they are self-signed or from a root cert. I can't see that it will require any special refactoring of the callers either.
> 
> For further information of the source: https://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/51/aft/2279/showtab/groupforums/Default.aspx
> 
> -Arve
> 
> -----Original Message-----
> From: Chip Childers
> Sent: 1. august 2012 03:25
> Subject: Re: Official ASF process for re-writing code?
> 
> Fantastic Arve!  Thanks for pitching in.
> 
> -chip
> 
> 
> On Tue, Jul 31, 2012 at 9:13 PM, Arve Paalsrud <Ar...@bayonette.no> wrote:
>> This code snippet is written by Jacob Gilley in a forum thread over at F5 Dev Central in 2005, and not F5 Network themselves. F5's version and the original code are identical - they've only added the copyright statements and optional GPL, so I've reached out to Jacob and asked if he's willing to release it under Apache.
>> 
>> Waiting for his reply.
>> 
>> -Arve
>> 
>> -----Original Message-----
>> From: Adrian Cole [mailto:ferncam1@gmail.com]
>> Sent: 1. august 2012 02:57
>> To: cloudstack-dev@incubator.apache.org
>> Subject: Re: Official ASF process for re-writing code?
>> 
>> +1 (non-binding and certainly not official) for taking the opportunity 
>> +to
>> rewrite code as a chance to make things better, vs least efforts.
>> 
>> Code written more than several months prior can often be written better anyway (one hopes their skills age well :P).  Particularly, unit tests are a welcome great improvement whenever there's code to be "rewritten".  I'd go so far as to say code without unit tests are often time bombs that should be rewritten anyway.
>> 
>> -A
>> 
>> 
>> On Tue, Jul 31, 2012 at 5:46 PM, Brett Porter <br...@apache.org> wrote:
>> 
>>> On 01/08/2012, at 6:52 AM, Chip Childers <ch...@sungard.com>
>>> wrote:
>>> 
>>>> Does anyone know the official ASF stance on what it means to 
>>>> "re-write" a section of code?
>>> 
>>> There's no general answer to this - each case needs to be considered 
>>> separately. This was the closest I could find in the archives:
>>> http://s.apache.org/rewriting-code
>>> 
>>>> 
>>>> Specifically, I was looking at the F5 code [1] that was found 
>>>> during license header changes (and is considered a release blocker bug [2]).
>>>> The code is actually quite trivial in nature, and I'm wondering 
>>>> what it would take to correctly write a replacement class file.  My 
>>>> assumption is that simply re-naming variables wouldn't work (and 
>>>> even if that was enough, there are only a handful of them in the file).
>>> 
>>> I agree, renaming variables is definitely not right.
>>> 
>>> In this case it is trivial (I googled and found a half-dozen examples 
>>> doing the same thing), so I'd say remove it and have someone 
>>> reimplement it. It may be better in these cases if they haven't seen 
>>> the original code, but not strictly necessary. It is probably a good 
>>> opportunity to refactor calling code too, if needed.
>>> 
>>> In other cases, an option available is to ask the copyright holder if 
>>> they'd consider contributing/granting a license to a piece of code to 
>>> include here.
>>> 
>>> Ultimately, we want to make sure we do the right thing by the authors 
>>> and that code here is intentionally contributed.
>>> 
>>> HTH,
>>> Brett
>>> 
>>> --
>>> Brett Porter
>>> brett@apache.org
>>> http://brettporter.wordpress.com/
>>> http://au.linkedin.com/in/brettporter
>>> http://twitter.com/brettporter
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>> 

RE: Official ASF process for re-writing code?

Posted by Arve Paalsrud <Ar...@bayonette.no>.
I have not been able to get a response from Jacob Gilley through a few channels, so we should move forward replacing the XTrustProvider class. It's not too big of a deal and shouldn't take long, but there are really not that many ways to do it. The task is pretty much to accept any SSL certificates, regardless if they are self-signed or from a root cert. I can't see that it will require any special refactoring of the callers either.

For further information of the source: https://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/51/aft/2279/showtab/groupforums/Default.aspx

-Arve

-----Original Message-----
From: Chip Childers
Sent: 1. august 2012 03:25
Subject: Re: Official ASF process for re-writing code?

Fantastic Arve!  Thanks for pitching in.

-chip


On Tue, Jul 31, 2012 at 9:13 PM, Arve Paalsrud <Ar...@bayonette.no> wrote:
> This code snippet is written by Jacob Gilley in a forum thread over at F5 Dev Central in 2005, and not F5 Network themselves. F5's version and the original code are identical - they've only added the copyright statements and optional GPL, so I've reached out to Jacob and asked if he's willing to release it under Apache.
>
> Waiting for his reply.
>
> -Arve
>
> -----Original Message-----
> From: Adrian Cole [mailto:ferncam1@gmail.com]
> Sent: 1. august 2012 02:57
> To: cloudstack-dev@incubator.apache.org
> Subject: Re: Official ASF process for re-writing code?
>
> +1 (non-binding and certainly not official) for taking the opportunity 
> +to
> rewrite code as a chance to make things better, vs least efforts.
>
> Code written more than several months prior can often be written better anyway (one hopes their skills age well :P).  Particularly, unit tests are a welcome great improvement whenever there's code to be "rewritten".  I'd go so far as to say code without unit tests are often time bombs that should be rewritten anyway.
>
> -A
>
>
> On Tue, Jul 31, 2012 at 5:46 PM, Brett Porter <br...@apache.org> wrote:
>
>> On 01/08/2012, at 6:52 AM, Chip Childers <ch...@sungard.com>
>> wrote:
>>
>> > Does anyone know the official ASF stance on what it means to 
>> > "re-write" a section of code?
>>
>> There's no general answer to this - each case needs to be considered 
>> separately. This was the closest I could find in the archives:
>> http://s.apache.org/rewriting-code
>>
>> >
>> > Specifically, I was looking at the F5 code [1] that was found 
>> > during license header changes (and is considered a release blocker bug [2]).
>> > The code is actually quite trivial in nature, and I'm wondering 
>> > what it would take to correctly write a replacement class file.  My 
>> > assumption is that simply re-naming variables wouldn't work (and 
>> > even if that was enough, there are only a handful of them in the file).
>>
>> I agree, renaming variables is definitely not right.
>>
>> In this case it is trivial (I googled and found a half-dozen examples 
>> doing the same thing), so I'd say remove it and have someone 
>> reimplement it. It may be better in these cases if they haven't seen 
>> the original code, but not strictly necessary. It is probably a good 
>> opportunity to refactor calling code too, if needed.
>>
>> In other cases, an option available is to ask the copyright holder if 
>> they'd consider contributing/granting a license to a piece of code to 
>> include here.
>>
>> Ultimately, we want to make sure we do the right thing by the authors 
>> and that code here is intentionally contributed.
>>
>> HTH,
>> Brett
>>
>> --
>> Brett Porter
>> brett@apache.org
>> http://brettporter.wordpress.com/
>> http://au.linkedin.com/in/brettporter
>> http://twitter.com/brettporter
>>
>>
>>
>>
>>
>>
>

Re: Official ASF process for re-writing code?

Posted by Chip Childers <ch...@sungard.com>.
Fantastic Arve!  Thanks for pitching in.

-chip


On Tue, Jul 31, 2012 at 9:13 PM, Arve Paalsrud
<Ar...@bayonette.no> wrote:
> This code snippet is written by Jacob Gilley in a forum thread over at F5 Dev Central in 2005, and not F5 Network themselves. F5's version and the original code are identical - they've only added the copyright statements and optional GPL, so I've reached out to Jacob and asked if he's willing to release it under Apache.
>
> Waiting for his reply.
>
> -Arve
>
> -----Original Message-----
> From: Adrian Cole [mailto:ferncam1@gmail.com]
> Sent: 1. august 2012 02:57
> To: cloudstack-dev@incubator.apache.org
> Subject: Re: Official ASF process for re-writing code?
>
> +1 (non-binding and certainly not official) for taking the opportunity
> +to
> rewrite code as a chance to make things better, vs least efforts.
>
> Code written more than several months prior can often be written better anyway (one hopes their skills age well :P).  Particularly, unit tests are a welcome great improvement whenever there's code to be "rewritten".  I'd go so far as to say code without unit tests are often time bombs that should be rewritten anyway.
>
> -A
>
>
> On Tue, Jul 31, 2012 at 5:46 PM, Brett Porter <br...@apache.org> wrote:
>
>> On 01/08/2012, at 6:52 AM, Chip Childers <ch...@sungard.com>
>> wrote:
>>
>> > Does anyone know the official ASF stance on what it means to
>> > "re-write" a section of code?
>>
>> There's no general answer to this - each case needs to be considered
>> separately. This was the closest I could find in the archives:
>> http://s.apache.org/rewriting-code
>>
>> >
>> > Specifically, I was looking at the F5 code [1] that was found during
>> > license header changes (and is considered a release blocker bug [2]).
>> > The code is actually quite trivial in nature, and I'm wondering what
>> > it would take to correctly write a replacement class file.  My
>> > assumption is that simply re-naming variables wouldn't work (and
>> > even if that was enough, there are only a handful of them in the file).
>>
>> I agree, renaming variables is definitely not right.
>>
>> In this case it is trivial (I googled and found a half-dozen examples
>> doing the same thing), so I'd say remove it and have someone
>> reimplement it. It may be better in these cases if they haven't seen
>> the original code, but not strictly necessary. It is probably a good
>> opportunity to refactor calling code too, if needed.
>>
>> In other cases, an option available is to ask the copyright holder if
>> they'd consider contributing/granting a license to a piece of code to
>> include here.
>>
>> Ultimately, we want to make sure we do the right thing by the authors
>> and that code here is intentionally contributed.
>>
>> HTH,
>> Brett
>>
>> --
>> Brett Porter
>> brett@apache.org
>> http://brettporter.wordpress.com/
>> http://au.linkedin.com/in/brettporter
>> http://twitter.com/brettporter
>>
>>
>>
>>
>>
>>
>

RE: Official ASF process for re-writing code?

Posted by Arve Paalsrud <Ar...@bayonette.no>.
This code snippet is written by Jacob Gilley in a forum thread over at F5 Dev Central in 2005, and not F5 Network themselves. F5's version and the original code are identical - they've only added the copyright statements and optional GPL, so I've reached out to Jacob and asked if he's willing to release it under Apache.

Waiting for his reply.

-Arve

-----Original Message-----
From: Adrian Cole [mailto:ferncam1@gmail.com] 
Sent: 1. august 2012 02:57
To: cloudstack-dev@incubator.apache.org
Subject: Re: Official ASF process for re-writing code?

+1 (non-binding and certainly not official) for taking the opportunity 
+to
rewrite code as a chance to make things better, vs least efforts.

Code written more than several months prior can often be written better anyway (one hopes their skills age well :P).  Particularly, unit tests are a welcome great improvement whenever there's code to be "rewritten".  I'd go so far as to say code without unit tests are often time bombs that should be rewritten anyway.

-A


On Tue, Jul 31, 2012 at 5:46 PM, Brett Porter <br...@apache.org> wrote:

> On 01/08/2012, at 6:52 AM, Chip Childers <ch...@sungard.com>
> wrote:
>
> > Does anyone know the official ASF stance on what it means to 
> > "re-write" a section of code?
>
> There's no general answer to this - each case needs to be considered 
> separately. This was the closest I could find in the archives:
> http://s.apache.org/rewriting-code
>
> >
> > Specifically, I was looking at the F5 code [1] that was found during 
> > license header changes (and is considered a release blocker bug [2]).
> > The code is actually quite trivial in nature, and I'm wondering what 
> > it would take to correctly write a replacement class file.  My 
> > assumption is that simply re-naming variables wouldn't work (and 
> > even if that was enough, there are only a handful of them in the file).
>
> I agree, renaming variables is definitely not right.
>
> In this case it is trivial (I googled and found a half-dozen examples 
> doing the same thing), so I'd say remove it and have someone 
> reimplement it. It may be better in these cases if they haven't seen 
> the original code, but not strictly necessary. It is probably a good 
> opportunity to refactor calling code too, if needed.
>
> In other cases, an option available is to ask the copyright holder if 
> they'd consider contributing/granting a license to a piece of code to 
> include here.
>
> Ultimately, we want to make sure we do the right thing by the authors 
> and that code here is intentionally contributed.
>
> HTH,
> Brett
>
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
> http://au.linkedin.com/in/brettporter
> http://twitter.com/brettporter
>
>
>
>
>
>

Re: Official ASF process for re-writing code?

Posted by Adrian Cole <fe...@gmail.com>.
+1 (non-binding and certainly not official) for taking the opportunity to
rewrite code as a chance to make things better, vs least efforts.

Code written more than several months prior can often be written better
anyway (one hopes their skills age well :P).  Particularly, unit tests are
a welcome great improvement whenever there's code to be "rewritten".  I'd
go so far as to say code without unit tests are often time bombs that
should be rewritten anyway.

-A


On Tue, Jul 31, 2012 at 5:46 PM, Brett Porter <br...@apache.org> wrote:

> On 01/08/2012, at 6:52 AM, Chip Childers <ch...@sungard.com>
> wrote:
>
> > Does anyone know the official ASF stance on what it means to
> > "re-write" a section of code?
>
> There's no general answer to this - each case needs to be considered
> separately. This was the closest I could find in the archives:
> http://s.apache.org/rewriting-code
>
> >
> > Specifically, I was looking at the F5 code [1] that was found during
> > license header changes (and is considered a release blocker bug [2]).
> > The code is actually quite trivial in nature, and I'm wondering what
> > it would take to correctly write a replacement class file.  My
> > assumption is that simply re-naming variables wouldn't work (and even
> > if that was enough, there are only a handful of them in the file).
>
> I agree, renaming variables is definitely not right.
>
> In this case it is trivial (I googled and found a half-dozen examples
> doing the same thing), so I'd say remove it and have someone reimplement
> it. It may be better in these cases if they haven't seen the original code,
> but not strictly necessary. It is probably a good opportunity to refactor
> calling code too, if needed.
>
> In other cases, an option available is to ask the copyright holder if
> they'd consider contributing/granting a license to a piece of code to
> include here.
>
> Ultimately, we want to make sure we do the right thing by the authors and
> that code here is intentionally contributed.
>
> HTH,
> Brett
>
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
> http://au.linkedin.com/in/brettporter
> http://twitter.com/brettporter
>
>
>
>
>
>

Re: Official ASF process for re-writing code?

Posted by Brett Porter <br...@apache.org>.
On 01/08/2012, at 6:52 AM, Chip Childers <ch...@sungard.com> wrote:

> Does anyone know the official ASF stance on what it means to
> "re-write" a section of code?

There's no general answer to this - each case needs to be considered separately. This was the closest I could find in the archives: http://s.apache.org/rewriting-code

> 
> Specifically, I was looking at the F5 code [1] that was found during
> license header changes (and is considered a release blocker bug [2]).
> The code is actually quite trivial in nature, and I'm wondering what
> it would take to correctly write a replacement class file.  My
> assumption is that simply re-naming variables wouldn't work (and even
> if that was enough, there are only a handful of them in the file).

I agree, renaming variables is definitely not right. 

In this case it is trivial (I googled and found a half-dozen examples doing the same thing), so I'd say remove it and have someone reimplement it. It may be better in these cases if they haven't seen the original code, but not strictly necessary. It is probably a good opportunity to refactor calling code too, if needed.

In other cases, an option available is to ask the copyright holder if they'd consider contributing/granting a license to a piece of code to include here.

Ultimately, we want to make sure we do the right thing by the authors and that code here is intentionally contributed.

HTH,
Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter
http://twitter.com/brettporter